Package com.google.cloud.bigquery
Class ExternalTableDefinition
java.lang.Object
com.google.cloud.bigquery.TableDefinition
com.google.cloud.bigquery.ExternalTableDefinition
- All Implemented Interfaces:
Serializable
Google BigQuery external table definition. BigQuery's external tables are tables whose data
reside outside of BigQuery but can be queried as normal BigQuery tables. External tables are
experimental and might be subject to change or removed.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classNested classes/interfaces inherited from class com.google.cloud.bigquery.TableDefinition
TableDefinition.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Boolean[Experimental] Returns whether automatic detection of schema and format options should be performed.abstract StringReturns the compression type of the data source.abstract StringReturns the connection ID used to connect to external data source.abstract StringReturns the format used to parse DATE values.abstract StringReturns the format used to parse DATETIME values.abstract com.google.common.collect.ImmutableList<String><F extends FormatOptions>
FReturns the source format, and possibly some parsing options, of the external data.[Experimental] Returns the HivePartitioningOptions when the data layout follows Hive partitioning conventionabstract Booleanabstract IntegerReturns the maximum number of bad records that BigQuery can ignore when reading data.Returns the maximum staleness of data that could be returned when the table is queried.Returns the metadata cache mode.Returns a list of strings represented as SQL NULL value in a CSV file.Returns the object metadata.abstract StringReturns the strategy used to match loaded columns to the schema, either POSITION or NAME.Returns the fully-qualified URIs that point to your data in Google Cloud Storage.abstract com.google.common.collect.ImmutableList<String>abstract StringReturns the format used to parse TIME values.abstract StringReturns the format used to parse TIMESTAMP values.abstract StringReturns the time zone used when parsing timestamp values that don't have specific time zone information.Returns whether BigQuery should allow extra values that are not represented in the table schema.newBuilder(String sourceUri) Creates a builder for an ExternalTableDefinition object.newBuilder(String sourceUri, FormatOptions format) Creates a builder for an ExternalTableDefinition object.newBuilder(String sourceUri, Schema schema, FormatOptions format) Creates a builder for an ExternalTableDefinition object.newBuilder(List<String> sourceUris, Schema schema, FormatOptions format) Creates a builder for an ExternalTableDefinition object.static ExternalTableDefinitionof(String sourceUri, FormatOptions format) Creates a builder for an ExternalTableDefinition object.static ExternalTableDefinitionof(String sourceUri, Schema schema, FormatOptions format) Creates an ExternalTableDefinition object.static ExternalTableDefinitionof(List<String> sourceUris, Schema schema, FormatOptions format) Creates an ExternalTableDefinition object.abstract ExternalTableDefinition.BuilderReturns a builder for theExternalTableDefinitionobject.Methods inherited from class com.google.cloud.bigquery.TableDefinition
getSchema, getType
-
Constructor Details
-
ExternalTableDefinition
public ExternalTableDefinition()
-
-
Method Details
-
getCompression
Returns the compression type of the data source.- See Also:
-
getConnectionId
Returns the connection ID used to connect to external data source.- See Also:
-
ignoreUnknownValues
Returns 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 ofgetFormatOptions()determines what BigQuery treats as an extra value.- See Also:
-
getIgnoreUnknownValues
-
getMaxBadRecords
Returns 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. -
getSourceUris
Returns the fully-qualified URIs that point to your data in Google Cloud Storage. 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.- See Also:
-
getFileSetSpecType
-
getSourceUrisImmut
-
getObjectMetadata
Returns the object metadata.- See Also:
-
getMetadataCacheMode
Returns the metadata cache mode.- See Also:
-
getMaxStaleness
Returns the maximum staleness of data that could be returned when the table is queried. Staleness encoded as a string encoding of sql IntervalValue type.- See Also:
-
getFormatOptions
Returns the source format, and possibly some parsing options, of the external data. Supported formats areCSVandNEWLINE_DELIMITED_JSON. -
getDecimalTargetTypes
-
getAutodetect
[Experimental] Returns whether automatic detection of schema and format options should be performed. -
getReferenceFileSchemaUri
-
getHivePartitioningOptions
[Experimental] Returns the HivePartitioningOptions when the data layout follows Hive partitioning convention -
getTimeZone
Returns the time zone used when parsing timestamp values that don't have specific time zone information. -
getDateFormat
Returns the format used to parse DATE values. -
getDatetimeFormat
Returns the format used to parse DATETIME values. -
getTimeFormat
Returns the format used to parse TIME values. -
getTimestampFormat
Returns the format used to parse TIMESTAMP values. -
getSourceColumnMatch
Returns the strategy used to match loaded columns to the schema, either POSITION or NAME. -
getNullMarkers
Returns a list of strings represented as SQL NULL value in a CSV file. -
toBuilder
Returns a builder for theExternalTableDefinitionobject.- Specified by:
toBuilderin classTableDefinition
-
newBuilder
public static ExternalTableDefinition.Builder newBuilder(List<String> sourceUris, Schema schema, FormatOptions format) Creates a builder for an ExternalTableDefinition object.- Parameters:
sourceUris- the fully-qualified URIs that point to your data in Google Cloud Storage. 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.schema- the schema for the external dataformat- the source format of the external data- Returns:
- a builder for an ExternalTableDefinition object given source URIs, schema and format
- See Also:
-
newBuilder
public static ExternalTableDefinition.Builder newBuilder(String sourceUri, Schema schema, FormatOptions format) Creates a builder for an ExternalTableDefinition object.- Parameters:
sourceUri- a fully-qualified URI that points to your data in Google Cloud Storage. The 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.schema- the schema for the external dataformat- the source format of the external data- Returns:
- a builder for an ExternalTableDefinition object given source URI, schema and format
- See Also:
-
newBuilder
Creates a builder for an ExternalTableDefinition object.- Parameters:
sourceUri- the fully-qualified URIs that point to your data in Google Cloud. 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. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs.format- the source format of the external data- Returns:
- a builder for an ExternalTableDefinition object given source URIs and format
- See Also:
-
newBuilder
Creates a builder for an ExternalTableDefinition object.- Parameters:
sourceUri- the fully-qualified URIs that point to your data in Google Cloud. 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. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs.- Returns:
- a builder for an ExternalTableDefinition object given source URIs and format
- See Also:
-
of
public static ExternalTableDefinition of(List<String> sourceUris, Schema schema, FormatOptions format) Creates an ExternalTableDefinition object.- Parameters:
sourceUris- the fully-qualified URIs that point to your data in Google Cloud Storage. 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.schema- the schema for the external dataformat- the source format of the external data- Returns:
- an ExternalTableDefinition object given source URIs, schema and format
- See Also:
-
of
Creates an ExternalTableDefinition object.- Parameters:
sourceUri- a fully-qualified URI that points to your data in Google Cloud Storage. The 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.schema- the schema for the external dataformat- the source format of the external data- Returns:
- an ExternalTableDefinition object given source URIs, schema and format
- See Also:
-
of
Creates a builder for an ExternalTableDefinition object.- Parameters:
sourceUri- the fully-qualified URIs that point to your data in Google Cloud. 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. Size limits related to load jobs apply to external data sources, plus an additional limit of 10 GB maximum size across all URIs.format- the source format of the external data- Returns:
- a builder for an ExternalTableDefinition object given source URIs and format
- See Also:
-