publicabstractstaticclass ExternalTableDefinition.BuilderextendsTableDefinition.Builder<ExternalTableDefinition,ExternalTableDefinition.Builder>
Constructors
Builder()
Methods
build()
publicabstractExternalTableDefinitionbuild()
Creates an ExternalTableDefinition object.
Overrides
setAutodetect(Boolean autodetect)
publicabstractExternalTableDefinition.BuildersetAutodetect(Booleanautodetect)
[Experimental] Sets detection of schema and format options automatically. Any option
specified explicitly will be honored.
| Parameter |
| Name |
Description |
autodetect |
Boolean
|
setCompression(String compression)
publicabstractExternalTableDefinition.BuildersetCompression(Stringcompression)
Sets compression type of the data source. By default no compression is assumed.
See Also: Compression
| Parameter |
| Name |
Description |
compression |
String
|
setConnectionId(String connectionId)
publicabstractExternalTableDefinition.BuildersetConnectionId(StringconnectionId)
[Optional, Trusted Tester] connectionId for external data source. The value may be
null.
| Parameter |
| Name |
Description |
connectionId |
String
|
setDecimalTargetTypes(List<String> decimalTargetTypes)
publicabstractExternalTableDefinition.BuildersetDecimalTargetTypes(List<String>decimalTargetTypes)
Defines the list of possible SQL data types to which the source decimal values are converted.
This list and the precision and the scale parameters of the decimal field determine the
target type. In the order of NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in
the specified list and if it supports the precision and the scale. STRING supports all
precision and scale values.
| Parameter |
| Name |
Description |
decimalTargetTypes |
List<String>
decimalTargetType or null for none
|
setFileSetSpecType(String fileSetSpecType)
publicExternalTableDefinition.BuildersetFileSetSpecType(StringfileSetSpecType)
Defines how to interpret files denoted by URIs. By default the files are assumed to be data
files (this can be specified explicitly via FILE_SET_SPEC_TYPE_FILE_SYSTEM_MATCH). A second
option is "FILE_SET_SPEC_TYPE_NEW_LINE_DELIMITED_MANIFEST" which interprets each file as a
manifest file, where each line is a reference to a file.
| Parameter |
| Name |
Description |
fileSetSpecType |
String
|
publicExternalTableDefinition.BuildersetFormatOptions(FormatOptionsformatOptions)
Sets the source format, and possibly some parsing options, of the external data. Supported
formats are CSV and NEWLINE_DELIMITED_JSON.
Source Format
setHivePartitioningOptions(HivePartitioningOptions hivePartitioningOptions)
publicExternalTableDefinition.BuildersetHivePartitioningOptions(HivePartitioningOptionshivePartitioningOptions)
Sets the table Hive partitioning options.
setIgnoreUnknownValues(Boolean ignoreUnknownValues)
publicabstractExternalTableDefinition.BuildersetIgnoreUnknownValues(BooleanignoreUnknownValues)
Sets whether BigQuery should allow extra values that are not represented in the table schema.
If true, the extra values are ignored. If false, records with extra columns are treated as
bad records, and if there are too many bad records, an invalid error is returned in the job
result. The default value is false. The value set with #setFormatOptions(FormatOptions) property determines what BigQuery treats as an extra value.
See Also: Ignore Unknown Values
| Parameter |
| Name |
Description |
ignoreUnknownValues |
Boolean
|
setMaxBadRecords(Integer maxBadRecords)
publicabstractExternalTableDefinition.BuildersetMaxBadRecords(IntegermaxBadRecords)
Sets the maximum number of bad records that BigQuery can ignore when reading data. If the
number of bad records exceeds this value, an invalid error is returned in the job result. The
default value is 0, which requires that all records are valid.
| Parameter |
| Name |
Description |
maxBadRecords |
Integer
|
setMaxStaleness(String maxStaleness)
publicExternalTableDefinition.BuildersetMaxStaleness(StringmaxStaleness)
[Optional] Metadata Cache Mode for the table. Set this to enable caching of metadata from
external data source.
See Also: MaxStaleness
| Parameter |
| Name |
Description |
maxStaleness |
String
|
publicExternalTableDefinition.BuildersetMetadataCacheMode(StringmetadataCacheMode)
[Optional] Metadata Cache Mode for the table. Set this to enable caching of metadata from
external data source.
See Also: MetadataCacheMode
| Parameter |
| Name |
Description |
metadataCacheMode |
String
|
publicExternalTableDefinition.BuildersetObjectMetadata(StringobjectMetadata)
| Parameter |
| Name |
Description |
objectMetadata |
String
|
setReferenceFileSchemaUri(String referenceFileSchemaUri)
publicabstractExternalTableDefinition.BuildersetReferenceFileSchemaUri(StringreferenceFileSchemaUri)
When creating an external table, the user can provide a reference file with the table schema.
This is enabled for the following formats: AVRO, PARQUET, ORC.
| Parameter |
| Name |
Description |
referenceFileSchemaUri |
String
or null for none
|
setSchema(Schema schema)
publicabstractExternalTableDefinition.BuildersetSchema(Schemaschema)
| Parameter |
| Name |
Description |
schema |
Schema
|
Overrides
setSourceUris(List<String> sourceUris)
publicExternalTableDefinition.BuildersetSourceUris(List<String>sourceUris)
Sets the fully-qualified URIs that point to your data in Google Cloud Storage (e.g.
gs://bucket/path). Each URI can contain one '*' wildcard character that must come after the
bucket's name. Size limits related to load jobs apply to external data sources, plus an
additional limit of 10 GB maximum size across all URIs.
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.
See Also: Quota
| Parameter |
| Name |
Description |
sourceUris |
List<String>
|
setType(TableDefinition.Type type)
publicabstractExternalTableDefinition.BuildersetType(TableDefinition.Typetype)
Overrides