public static final class LoadJobConfiguration.Builder extends JobConfiguration.Builder<LoadJobConfiguration,LoadJobConfiguration.Builder> implements LoadConfiguration.Builder
Modifier and Type | Method and Description |
---|---|
LoadJobConfiguration |
build()
Creates an object.
|
LoadJobConfiguration.Builder |
setAutodetect(Boolean autodetect)
[Experimental] Sets automatic inference of the options and schema for CSV and JSON sources.
|
LoadJobConfiguration.Builder |
setClustering(Clustering clustering)
Sets the clustering specification for the destination table.
|
LoadJobConfiguration.Builder |
setConnectionProperties(List<ConnectionProperty> connectionProperties) |
LoadJobConfiguration.Builder |
setCreateDisposition(JobInfo.CreateDisposition createDisposition)
Sets whether the job is allowed to create new tables.
|
LoadJobConfiguration.Builder |
setCreateSession(Boolean createSession) |
LoadJobConfiguration.Builder |
setDecimalTargetTypes(List<String> decimalTargetTypes)
Defines the list of possible SQL data types to which the source decimal values are converted.
|
LoadJobConfiguration.Builder |
setDestinationEncryptionConfiguration(EncryptionConfiguration encryptionConfiguration) |
LoadJobConfiguration.Builder |
setDestinationTable(TableId destinationTable)
Sets the destination table to load the data into.
|
LoadJobConfiguration.Builder |
setFormatOptions(FormatOptions formatOptions)
Sets the source format, and possibly some parsing options, of the external data.
|
LoadJobConfiguration.Builder |
setHivePartitioningOptions(HivePartitioningOptions hivePartitioningOptions) |
LoadJobConfiguration.Builder |
setIgnoreUnknownValues(Boolean ignoreUnknownValues)
Sets whether BigQuery should allow extra values that are not represented in the table schema.
|
LoadJobConfiguration.Builder |
setJobTimeoutMs(Long jobTimeoutMs)
[Optional] Job timeout in milliseconds.
|
LoadJobConfiguration.Builder |
setLabels(Map<String,String> labels)
The labels associated with this job.
|
LoadJobConfiguration.Builder |
setMaxBadRecords(Integer maxBadRecords)
Sets the maximum number of bad records that BigQuery can ignore when running the job.
|
LoadJobConfiguration.Builder |
setNullMarker(String nullMarker)
Sets the string that represents a null value in a CSV file.
|
LoadJobConfiguration.Builder |
setRangePartitioning(RangePartitioning rangePartitioning)
Range partitioning specification for this table.
|
LoadJobConfiguration.Builder |
setReferenceFileSchemaUri(String referenceFileSchemaUri)
When creating an external table, the user can provide a reference file with the table schema.
|
LoadJobConfiguration.Builder |
setSchema(Schema schema)
Sets the schema for the destination table.
|
LoadJobConfiguration.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.
|
LoadJobConfiguration.Builder |
setSourceUris(List<String> sourceUris)
Sets the fully-qualified URIs that point to source data in Google Cloud Storage (e.g.
|
LoadJobConfiguration.Builder |
setTimePartitioning(TimePartitioning timePartitioning)
Sets the time partitioning specification for the destination table.
|
LoadJobConfiguration.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).
|
LoadJobConfiguration.Builder |
setWriteDisposition(JobInfo.WriteDisposition writeDisposition)
Sets the action that should occur if the destination table already exists.
|
public LoadJobConfiguration.Builder setDestinationTable(TableId destinationTable)
LoadConfiguration.Builder
setDestinationTable
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setDestinationEncryptionConfiguration(EncryptionConfiguration encryptionConfiguration)
setDestinationEncryptionConfiguration
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setCreateDisposition(JobInfo.CreateDisposition createDisposition)
LoadConfiguration.Builder
setCreateDisposition
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setWriteDisposition(JobInfo.WriteDisposition writeDisposition)
LoadConfiguration.Builder
setWriteDisposition
in interface LoadConfiguration.Builder
public LoadJobConfiguration.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 LoadJobConfiguration.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 LoadJobConfiguration.Builder setMaxBadRecords(Integer maxBadRecords)
LoadConfiguration.Builder
setMaxBadRecords
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setSchema(Schema schema)
LoadConfiguration.Builder
DATASTORE_BACKUP
format option).setSchema
in interface LoadConfiguration.Builder
public LoadJobConfiguration.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 LoadJobConfiguration.Builder setTimePartitioning(TimePartitioning timePartitioning)
LoadConfiguration.Builder
setTimePartitioning
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setClustering(Clustering clustering)
LoadConfiguration.Builder
setClustering
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setUseAvroLogicalTypes(Boolean useAvroLogicalTypes)
LoadConfiguration.Builder
null
.setUseAvroLogicalTypes
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setSourceUris(List<String> sourceUris)
public LoadJobConfiguration.Builder setDecimalTargetTypes(List<String> decimalTargetTypes)
setDecimalTargetTypes
in interface LoadConfiguration.Builder
decimalTargetTypes
- decimalTargetType or null
for nonepublic LoadJobConfiguration.Builder setAutodetect(Boolean autodetect)
LoadConfiguration.Builder
setAutodetect
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setSchemaUpdateOptions(List<JobInfo.SchemaUpdateOption> schemaUpdateOptions)
LoadConfiguration.Builder
setSchemaUpdateOptions
in interface LoadConfiguration.Builder
public LoadJobConfiguration.Builder setLabels(Map<String,String> labels)
labels
- labels or null
for nonepublic LoadJobConfiguration.Builder setJobTimeoutMs(Long jobTimeoutMs)
jobTimeoutMs
- jobTimeoutMs or null
for nonepublic LoadJobConfiguration.Builder setRangePartitioning(RangePartitioning rangePartitioning)
rangePartitioning
- rangePartitioning or null
for nonepublic LoadJobConfiguration.Builder setHivePartitioningOptions(HivePartitioningOptions hivePartitioningOptions)
public LoadJobConfiguration.Builder setReferenceFileSchemaUri(String referenceFileSchemaUri)
referenceFileSchemaUri
- or null
for nonepublic LoadJobConfiguration.Builder setConnectionProperties(List<ConnectionProperty> connectionProperties)
public LoadJobConfiguration.Builder setCreateSession(Boolean createSession)
public LoadJobConfiguration build()
JobConfiguration.Builder
build
in interface LoadConfiguration.Builder
build
in class JobConfiguration.Builder<LoadJobConfiguration,LoadJobConfiguration.Builder>
Copyright © 2023 Google LLC. All rights reserved.