public static final class WriteChannelConfiguration.Builder extends Object implements LoadConfiguration.Builder
Modifier and Type | Method and Description |
---|---|
WriteChannelConfiguration |
build() |
WriteChannelConfiguration.Builder |
setAutodetect(Boolean autodetect)
[Experimental] Sets automatic inference of the options and schema for CSV and JSON sources.
|
WriteChannelConfiguration.Builder |
setClustering(Clustering clustering)
Sets the clustering specification for the destination table.
|
WriteChannelConfiguration.Builder |
setConnectionProperties(List<ConnectionProperty> connectionProperties) |
WriteChannelConfiguration.Builder |
setCreateDisposition(JobInfo.CreateDisposition createDisposition)
Sets whether the job is allowed to create new tables.
|
WriteChannelConfiguration.Builder |
setCreateSession(Boolean createSession) |
WriteChannelConfiguration.Builder |
setDecimalTargetTypes(List<String> decimalTargetTypes)
Defines the list of possible SQL data types to which the source decimal values are converted.
|
LoadConfiguration.Builder |
setDestinationEncryptionConfiguration(EncryptionConfiguration encryptionConfiguration) |
WriteChannelConfiguration.Builder |
setDestinationTable(TableId destinationTable)
Sets the destination table to load the data into.
|
WriteChannelConfiguration.Builder |
setFormatOptions(FormatOptions formatOptions)
Sets the source format, and possibly some parsing options, of the external data.
|
WriteChannelConfiguration.Builder |
setIgnoreUnknownValues(Boolean ignoreUnknownValues)
Sets whether BigQuery should allow extra values that are not represented in the table schema.
|
WriteChannelConfiguration.Builder |
setLabels(Map<String,String> labels) |
WriteChannelConfiguration.Builder |
setMaxBadRecords(Integer maxBadRecords)
Sets the maximum number of bad records that BigQuery can ignore when running the job.
|
WriteChannelConfiguration.Builder |
setNullMarker(String nullMarker)
Sets the string that represents a null value in a CSV file.
|
WriteChannelConfiguration.Builder |
setSchema(Schema schema)
Sets the schema for the destination table.
|
WriteChannelConfiguration.Builder |
setSchemaUpdateOptions(List<JobInfo.SchemaUpdateOption> schemaUpdateOptions)
[Experimental] Sets options allowing the schema of the destination table to be updated as a
side effect of the load job.
|
WriteChannelConfiguration.Builder |
setTimePartitioning(TimePartitioning timePartitioning)
Sets the time partitioning specification for the destination table.
|
WriteChannelConfiguration.Builder |
setUseAvroLogicalTypes(Boolean useAvroLogicalTypes)
If FormatOptions is set to AVRO, you can interpret logical types into their corresponding
types (such as TIMESTAMP) instead of only using their raw types (such as INTEGER).
|
WriteChannelConfiguration.Builder |
setWriteDisposition(JobInfo.WriteDisposition writeDisposition)
Sets the action that should occur if the destination table already exists.
|
public WriteChannelConfiguration.Builder setDestinationTable(TableId destinationTable)
LoadConfiguration.Builder
setDestinationTable
in interface LoadConfiguration.Builder
public LoadConfiguration.Builder setDestinationEncryptionConfiguration(EncryptionConfiguration encryptionConfiguration)
setDestinationEncryptionConfiguration
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setCreateDisposition(JobInfo.CreateDisposition createDisposition)
LoadConfiguration.Builder
setCreateDisposition
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setWriteDisposition(JobInfo.WriteDisposition writeDisposition)
LoadConfiguration.Builder
setWriteDisposition
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setFormatOptions(FormatOptions formatOptions)
LoadConfiguration.Builder
CSV
, NEWLINE_DELIMITED_JSON
and DATASTORE_BACKUP
. If not
specified, CSV
format is assumed.
setFormatOptions
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setNullMarker(String nullMarker)
LoadConfiguration.Builder
STRING
and BYTE
. For
STRING
and BYTE
columns, BigQuery interprets the empty string as an empty
value.setNullMarker
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setMaxBadRecords(Integer maxBadRecords)
LoadConfiguration.Builder
setMaxBadRecords
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setSchema(Schema schema)
LoadConfiguration.Builder
DATASTORE_BACKUP
format option).setSchema
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setIgnoreUnknownValues(Boolean ignoreUnknownValues)
LoadConfiguration.Builder
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. By default unknown values are not allowed.setIgnoreUnknownValues
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setSchemaUpdateOptions(List<JobInfo.SchemaUpdateOption> schemaUpdateOptions)
LoadConfiguration.Builder
setSchemaUpdateOptions
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setAutodetect(Boolean autodetect)
LoadConfiguration.Builder
setAutodetect
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setTimePartitioning(TimePartitioning timePartitioning)
LoadConfiguration.Builder
setTimePartitioning
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setClustering(Clustering clustering)
LoadConfiguration.Builder
setClustering
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setUseAvroLogicalTypes(Boolean useAvroLogicalTypes)
LoadConfiguration.Builder
null
.setUseAvroLogicalTypes
in interface LoadConfiguration.Builder
public WriteChannelConfiguration.Builder setLabels(Map<String,String> labels)
public WriteChannelConfiguration.Builder setDecimalTargetTypes(List<String> decimalTargetTypes)
LoadConfiguration.Builder
setDecimalTargetTypes
in interface LoadConfiguration.Builder
decimalTargetTypes
- decimalTargetType or null
for nonepublic WriteChannelConfiguration.Builder setConnectionProperties(List<ConnectionProperty> connectionProperties)
public WriteChannelConfiguration.Builder setCreateSession(Boolean createSession)
public WriteChannelConfiguration build()
build
in interface LoadConfiguration.Builder
Copyright © 2023 Google LLC. All rights reserved.