Class LoadJobConfiguration (2.42.1)

public final class LoadJobConfiguration extends JobConfiguration implements LoadConfiguration

Google BigQuery load job configuration. A load job loads data from one of several formats into a table. Data is provided as URIs that point to objects in Google Cloud Storage. Load job configurations have JobConfiguration.Type#LOAD type.

Inheritance

Object > JobConfiguration > LoadJobConfiguration

Implements

LoadConfiguration

Static Methods

builder(TableId destinationTable, String sourceUri)

public static LoadJobConfiguration.Builder builder(TableId destinationTable, String sourceUri)

Creates a builder for a BigQuery Load Job configuration given the destination table and source URI.

Parameters
Name Description
destinationTable TableId
sourceUri String
Returns
Type Description
LoadJobConfiguration.Builder

newBuilder(TableId destinationTable, String sourceUri)

public static LoadJobConfiguration.Builder newBuilder(TableId destinationTable, String sourceUri)

Creates a builder for a BigQuery Load Job configuration given the destination table and source URI.

Parameters
Name Description
destinationTable TableId
sourceUri String
Returns
Type Description
LoadJobConfiguration.Builder

newBuilder(TableId destinationTable, String sourceUri, FormatOptions format)

public static LoadJobConfiguration.Builder newBuilder(TableId destinationTable, String sourceUri, FormatOptions format)

Creates a builder for a BigQuery Load Job configuration given the destination table, format and source URI.

Parameters
Name Description
destinationTable TableId
sourceUri String
format FormatOptions
Returns
Type Description
LoadJobConfiguration.Builder

newBuilder(TableId destinationTable, List<String> sourceUris)

public static LoadJobConfiguration.Builder newBuilder(TableId destinationTable, List<String> sourceUris)

Creates a builder for a BigQuery Load Job configuration given the destination table and source URIs.

Parameters
Name Description
destinationTable TableId
sourceUris List<String>
Returns
Type Description
LoadJobConfiguration.Builder

newBuilder(TableId destinationTable, List<String> sourceUris, FormatOptions format)

public static LoadJobConfiguration.Builder newBuilder(TableId destinationTable, List<String> sourceUris, FormatOptions format)

Creates a builder for a BigQuery Load Job configuration given the destination table, format and source URIs.

Parameters
Name Description
destinationTable TableId
sourceUris List<String>
format FormatOptions
Returns
Type Description
LoadJobConfiguration.Builder

of(TableId destinationTable, String sourceUri)

public static LoadJobConfiguration of(TableId destinationTable, String sourceUri)

Returns a BigQuery Load Job Configuration for the given destination table and source URI.

Parameters
Name Description
destinationTable TableId
sourceUri String
Returns
Type Description
LoadJobConfiguration

of(TableId destinationTable, String sourceUri, FormatOptions format)

public static LoadJobConfiguration of(TableId destinationTable, String sourceUri, FormatOptions format)

Returns a BigQuery Load Job Configuration for the given destination table, format and source URI.

Parameters
Name Description
destinationTable TableId
sourceUri String
format FormatOptions
Returns
Type Description
LoadJobConfiguration

of(TableId destinationTable, List<String> sourceUris)

public static LoadJobConfiguration of(TableId destinationTable, List<String> sourceUris)

Returns a BigQuery Load Job Configuration for the given destination table and source URIs.

Parameters
Name Description
destinationTable TableId
sourceUris List<String>
Returns
Type Description
LoadJobConfiguration

of(TableId destinationTable, List<String> sourceUris, FormatOptions format)

public static LoadJobConfiguration of(TableId destinationTable, List<String> sourceUris, FormatOptions format)

Returns a BigQuery Load Job Configuration for the given destination table, format and source URI.

Parameters
Name Description
destinationTable TableId
sourceUris List<String>
format FormatOptions
Returns
Type Description
LoadJobConfiguration

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAutodetect()

public Boolean getAutodetect()

[Experimental] Returns whether automatic inference of the options and schema for CSV and JSON sources is set.

Returns
Type Description
Boolean

getClustering()

public Clustering getClustering()

Returns the clustering specification for the definition table.

Returns
Type Description
Clustering

getColumnNameCharacterMap()

public String getColumnNameCharacterMap()

Returns the column name character map used in CSV/Parquet loads. See Also: ColumnNameCharacterMap

Returns
Type Description
String

getConnectionProperties()

public List<ConnectionProperty> getConnectionProperties()
Returns
Type Description
List<ConnectionProperty>

getCreateDisposition()

public JobInfo.CreateDisposition getCreateDisposition()

Returns whether the job is allowed to create new tables.

Returns
Type Description
JobInfo.CreateDisposition

getCreateSession()

public Boolean getCreateSession()
Returns
Type Description
Boolean

getCsvOptions()

public CsvOptions getCsvOptions()

Returns additional properties used to parse CSV data (used when #getFormat() is set to CSV). Returns null if not set.

Returns
Type Description
CsvOptions

getDatastoreBackupOptions()

public DatastoreBackupOptions getDatastoreBackupOptions()

Returns additional options used to load from a Cloud datastore backup.

Returns
Type Description
DatastoreBackupOptions

getDecimalTargetTypes()

public List<String> getDecimalTargetTypes()

Returns 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.

Returns
Type Description
List<String>

getDestinationEncryptionConfiguration()

public EncryptionConfiguration getDestinationEncryptionConfiguration()
Returns
Type Description
EncryptionConfiguration

getDestinationTable()

public TableId getDestinationTable()

Returns the destination table to load the data into.

Returns
Type Description
TableId

getFileSetSpecType()

public String getFileSetSpecType()
Returns
Type Description
String

getFormat()

public String getFormat()

Returns the format of the data files.

Returns
Type Description
String

getHivePartitioningOptions()

public HivePartitioningOptions getHivePartitioningOptions()
Returns
Type Description
HivePartitioningOptions

getJobTimeoutMs()

public Long getJobTimeoutMs()

Returns the timeout associated with this job

Returns
Type Description
Long

getLabels()

public Map<String,String> getLabels()

Returns the labels associated with this job

Returns
Type Description
Map<String,String>

getMaxBadRecords()

public Integer getMaxBadRecords()

Returns the maximum number of bad records that BigQuery can ignore when running the job. If the number of bad records exceeds this value, an invalid error is returned in the job result. By default no bad record is ignored.

Returns
Type Description
Integer

getNullMarker()

public String getNullMarker()

Returns the string that represents a null value in a CSV file.

Returns
Type Description
String

getParquetOptions()

public ParquetOptions getParquetOptions()
Returns
Type Description
ParquetOptions

getRangePartitioning()

public RangePartitioning getRangePartitioning()

Returns the range partitioning specification for the table

Returns
Type Description
RangePartitioning

getReferenceFileSchemaUri()

public String getReferenceFileSchemaUri()
Returns
Type Description
String

getSchema()

public Schema getSchema()

Returns the schema for the destination table, if set. Returns null otherwise.

Returns
Type Description
Schema

getSchemaUpdateOptions()

public List<JobInfo.SchemaUpdateOption> getSchemaUpdateOptions()

[Experimental] Returns options allowing the schema of the destination table to be updated as a side effect of the load job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema.

Returns
Type Description
List<SchemaUpdateOption>

getSourceUris()

public List<String> getSourceUris()

Returns the fully-qualified URIs that point to source data in Google Cloud Storage (e.g. gs://bucket/path). Each URI can contain one '*' wildcard character and it must come after the 'bucket' name.

Returns
Type Description
List<String>

getTimePartitioning()

public TimePartitioning getTimePartitioning()

Returns the time partitioning specification defined for the destination table.

Returns
Type Description
TimePartitioning

getUseAvroLogicalTypes()

public Boolean getUseAvroLogicalTypes()

Returns True/False. Indicates whether the logical type is interpreted.

Returns
Type Description
Boolean

getWriteDisposition()

public JobInfo.WriteDisposition getWriteDisposition()

Returns the action that should occur if the destination table already exists.

Returns
Type Description
JobInfo.WriteDisposition

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

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 true, 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.

Returns
Type Description
Boolean

toBuilder()

public LoadJobConfiguration.Builder toBuilder()

Returns a builder for the object.

Returns
Type Description
LoadJobConfiguration.Builder
Overrides