Class ExternalTableDefinition (2.23.1)

public abstract class ExternalTableDefinition extends TableDefinition

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: Federated Data Sources

Inheritance

java.lang.Object > TableDefinition > ExternalTableDefinition

Static Methods

newBuilder(String sourceUri, FormatOptions format)

public static ExternalTableDefinition.Builder newBuilder(String sourceUri, FormatOptions format)

Creates a builder for an ExternalTableDefinition object. See Also: Source Format, Quota

Parameters
NameDescription
sourceUriString

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.

formatFormatOptions

the source format of the external data

Returns
TypeDescription
ExternalTableDefinition.Builder

a builder for an ExternalTableDefinition object given source URIs and format

newBuilder(String sourceUri, Schema schema, FormatOptions format)

public static ExternalTableDefinition.Builder newBuilder(String sourceUri, Schema schema, FormatOptions format)

Creates a builder for an ExternalTableDefinition object. See Also: Source Format, Quota

Parameters
NameDescription
sourceUriString

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.

schemaSchema

the schema for the external data

formatFormatOptions

the source format of the external data

Returns
TypeDescription
ExternalTableDefinition.Builder

a builder for an ExternalTableDefinition object given source URI, schema and format

newBuilder(List<String> sourceUris, Schema schema, FormatOptions format)

public static ExternalTableDefinition.Builder newBuilder(List<String> sourceUris, Schema schema, FormatOptions format)

Creates a builder for an ExternalTableDefinition object. See Also: Source Format, Quota

Parameters
NameDescription
sourceUrisList<String>

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.

schemaSchema

the schema for the external data

formatFormatOptions

the source format of the external data

Returns
TypeDescription
ExternalTableDefinition.Builder

a builder for an ExternalTableDefinition object given source URIs, schema and format

of(String sourceUri, FormatOptions format)

public static ExternalTableDefinition of(String sourceUri, FormatOptions format)

Creates a builder for an ExternalTableDefinition object. See Also: Source Format, Quota

Parameters
NameDescription
sourceUriString

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.

formatFormatOptions

the source format of the external data

Returns
TypeDescription
ExternalTableDefinition

a builder for an ExternalTableDefinition object given source URIs and format

of(String sourceUri, Schema schema, FormatOptions format)

public static ExternalTableDefinition of(String sourceUri, Schema schema, FormatOptions format)

Creates an ExternalTableDefinition object. See Also: Source Format, Quota

Parameters
NameDescription
sourceUriString

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.

schemaSchema

the schema for the external data

formatFormatOptions

the source format of the external data

Returns
TypeDescription
ExternalTableDefinition

an ExternalTableDefinition object given source URIs, schema and format

of(List<String> sourceUris, Schema schema, FormatOptions format)

public static ExternalTableDefinition of(List<String> sourceUris, Schema schema, FormatOptions format)

Creates an ExternalTableDefinition object. See Also: Source Format, Quota

Parameters
NameDescription
sourceUrisList<String>

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.

schemaSchema

the schema for the external data

formatFormatOptions

the source format of the external data

Returns
TypeDescription
ExternalTableDefinition

an ExternalTableDefinition object given source URIs, schema and format

Constructors

ExternalTableDefinition()

public ExternalTableDefinition()

Methods

<F>getFormatOptions()

public F <F>getFormatOptions()

Returns the source format, and possibly some parsing options, of the external data. Supported formats are CSV and NEWLINE_DELIMITED_JSON.

Returns
TypeDescription
F

getAutodetect()

public abstract Boolean getAutodetect()

[Experimental] Returns whether automatic detection of schema and format options should be performed.

Returns
TypeDescription
Boolean

getCompression()

public abstract String getCompression()

Returns the compression type of the data source. See Also: Compression

Returns
TypeDescription
String

getConnectionId()

public abstract String getConnectionId()

Returns the connection ID used to connect to external data source. See Also: ConnectionId

Returns
TypeDescription
String

getDecimalTargetTypes()

public abstract ImmutableList<String> getDecimalTargetTypes()
Returns
TypeDescription
com.google.common.collect.ImmutableList<String>

getHivePartitioningOptions()

public HivePartitioningOptions getHivePartitioningOptions()

[Experimental] Returns the HivePartitioningOptions when the data layout follows Hive partitioning convention

Returns
TypeDescription
HivePartitioningOptions

getIgnoreUnknownValues()

public abstract Boolean getIgnoreUnknownValues()
Returns
TypeDescription
Boolean

getMaxBadRecords()

public abstract Integer 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.

Returns
TypeDescription
Integer

getReferenceFileSchemaUri()

public abstract String getReferenceFileSchemaUri()
Returns
TypeDescription
String

getSourceUris()

public List<String> 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: Quota

Returns
TypeDescription
List<String>

getSourceUrisImmut()

public abstract ImmutableList<String> getSourceUrisImmut()
Returns
TypeDescription
com.google.common.collect.ImmutableList<String>

ignoreUnknownValues()

public Boolean 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 of <xref uid="com.google.cloud.bigquery.ExternalTableDefinition.<F>getFormatOptions()" data-throw-if-not-resolved="false">#getFormatOptions() determines what BigQuery treats as an extra value. See Also: Ignore Unknown Values

Returns
TypeDescription
Boolean

toBuilder()

public abstract ExternalTableDefinition.Builder toBuilder()

Returns a builder for the ExternalTableDefinition object.

Returns
TypeDescription
ExternalTableDefinition.Builder
Overrides