public abstract static class ExternalTableDefinition.Builder extends TableDefinition.Builder<ExternalTableDefinition,ExternalTableDefinition.Builder>
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract ExternalTableDefinition |
build()
Creates an
ExternalTableDefinition object. |
abstract ExternalTableDefinition.Builder |
setAutodetect(Boolean autodetect)
[Experimental] Sets detection of schema and format options automatically.
|
abstract ExternalTableDefinition.Builder |
setCompression(String compression)
Sets compression type of the data source.
|
abstract ExternalTableDefinition.Builder |
setConnectionId(String connectionId)
[Optional, Trusted Tester] connectionId for external data source.
|
abstract ExternalTableDefinition.Builder |
setDecimalTargetTypes(List<String> decimalTargetTypes)
Defines the list of possible SQL data types to which the source decimal values are converted.
|
ExternalTableDefinition.Builder |
setFormatOptions(FormatOptions formatOptions)
Sets the source format, and possibly some parsing options, of the external data.
|
ExternalTableDefinition.Builder |
setHivePartitioningOptions(HivePartitioningOptions hivePartitioningOptions)
Sets the table Hive partitioning options.
|
abstract ExternalTableDefinition.Builder |
setIgnoreUnknownValues(Boolean ignoreUnknownValues)
Sets whether BigQuery should allow extra values that are not represented in the table schema.
|
abstract ExternalTableDefinition.Builder |
setMaxBadRecords(Integer maxBadRecords)
Sets the maximum number of bad records that BigQuery can ignore when reading data.
|
abstract ExternalTableDefinition.Builder |
setReferenceFileSchemaUri(String referenceFileSchemaUri)
When creating an external table, the user can provide a reference file with the table schema.
|
abstract ExternalTableDefinition.Builder |
setSchema(Schema schema)
Sets the table schema.
|
ExternalTableDefinition.Builder |
setSourceUris(List<String> sourceUris)
Sets the fully-qualified URIs that point to your data in Google Cloud Storage (e.g.
|
abstract ExternalTableDefinition.Builder |
setType(TableDefinition.Type type) |
public ExternalTableDefinition.Builder setSourceUris(List<String> sourceUris)
For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table.
For Google Cloud Datastore backup URIs: Exactly one URI can be specified. Also, the '*' wildcard character is not allowed.
public ExternalTableDefinition.Builder setFormatOptions(FormatOptions formatOptions)
CSV
and NEWLINE_DELIMITED_JSON
.
public abstract ExternalTableDefinition.Builder setDecimalTargetTypes(List<String> decimalTargetTypes)
decimalTargetTypes
- decimalTargetType or null
for nonepublic abstract ExternalTableDefinition.Builder setMaxBadRecords(Integer maxBadRecords)
public abstract ExternalTableDefinition.Builder setIgnoreUnknownValues(Boolean ignoreUnknownValues)
setFormatOptions(FormatOptions)
property determines what BigQuery treats as an extra value.public abstract ExternalTableDefinition.Builder setCompression(String compression)
public abstract ExternalTableDefinition.Builder setConnectionId(String connectionId)
null
.public abstract ExternalTableDefinition.Builder setAutodetect(Boolean autodetect)
public abstract ExternalTableDefinition.Builder setType(TableDefinition.Type type)
setType
in class TableDefinition.Builder<ExternalTableDefinition,ExternalTableDefinition.Builder>
public abstract ExternalTableDefinition.Builder setSchema(Schema schema)
setSchema
in class TableDefinition.Builder<ExternalTableDefinition,ExternalTableDefinition.Builder>
public ExternalTableDefinition.Builder setHivePartitioningOptions(HivePartitioningOptions hivePartitioningOptions)
public abstract ExternalTableDefinition.Builder setReferenceFileSchemaUri(String referenceFileSchemaUri)
referenceFileSchemaUri
- or null
for nonepublic abstract ExternalTableDefinition build()
ExternalTableDefinition
object.build
in class TableDefinition.Builder<ExternalTableDefinition,ExternalTableDefinition.Builder>
Copyright © 2023 Google LLC. All rights reserved.