Package com.google.cloud.bigquery
Class LoadJobConfiguration
java.lang.Object
com.google.cloud.bigquery.JobConfiguration
com.google.cloud.bigquery.LoadJobConfiguration
- All Implemented Interfaces:
LoadConfiguration,Serializable
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.- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.cloud.bigquery.JobConfiguration
JobConfiguration.Type -
Method Summary
Modifier and TypeMethodDescriptionstatic LoadJobConfiguration.BuilderCreates a builder for a BigQuery Load Job configuration given the destination table and source URI.booleanReturns whether automatic inference of the options and schema for CSV and JSON sources is set.Returns the clustering specification for the definition table.Returns the column name character map used in CSV/Parquet loads.Returns whether the job is allowed to create new tables.Returns additional properties used to parse CSV data (used whenLoadConfiguration.getFormat()is set to CSV).Returns additional options used to load from a Cloud datastore backup.Returns the list of possible SQL data types to which the source decimal values are converted.Returns the destination table to load the data into.Returns the format of the data files.Returns the timeout associated with this jobReturns the labels associated with this jobReturns the maximum number of bad records that BigQuery can ignore when running the job.Returns the string that represents a null value in a CSV file.Returns the range partitioning specification for the tableReturns the reservation associated with this jobReturns the schema for the destination table, if set.Returns options allowing the schema of the destination table to be updated as a side effect of the load job.Returns the fully-qualified URIs that point to source data in Google Cloud Storage (e.g.Returns the time partitioning specification defined for the destination table.Returns True/False.Returns the action that should occur if the destination table already exists.inthashCode()Returns whether BigQuery should allow extra values that are not represented in the table schema.static LoadJobConfiguration.BuildernewBuilder(TableId destinationTable, String sourceUri) Creates a builder for a BigQuery Load Job configuration given the destination table and source URI.static LoadJobConfiguration.BuildernewBuilder(TableId destinationTable, String sourceUri, FormatOptions format) Creates a builder for a BigQuery Load Job configuration given the destination table, format and source URI.static LoadJobConfiguration.BuildernewBuilder(TableId destinationTable, List<String> sourceUris) Creates a builder for a BigQuery Load Job configuration given the destination table and source URIs.static LoadJobConfiguration.BuildernewBuilder(TableId destinationTable, List<String> sourceUris, FormatOptions format) Creates a builder for a BigQuery Load Job configuration given the destination table, format and source URIs.static LoadJobConfigurationReturns a BigQuery Load Job Configuration for the given destination table and source URI.static LoadJobConfigurationof(TableId destinationTable, String sourceUri, FormatOptions format) Returns a BigQuery Load Job Configuration for the given destination table, format and source URI.static LoadJobConfigurationReturns a BigQuery Load Job Configuration for the given destination table and source URIs.static LoadJobConfigurationof(TableId destinationTable, List<String> sourceUris, FormatOptions format) Returns a BigQuery Load Job Configuration for the given destination table, format and source URI.Returns a builder for the object.Methods inherited from class com.google.cloud.bigquery.JobConfiguration
getType, toString
-
Method Details
-
getDestinationTable
Description copied from interface:LoadConfigurationReturns the destination table to load the data into.- Specified by:
getDestinationTablein interfaceLoadConfiguration
-
getDestinationEncryptionConfiguration
- Specified by:
getDestinationEncryptionConfigurationin interfaceLoadConfiguration
-
getCreateDisposition
Description copied from interface:LoadConfigurationReturns whether the job is allowed to create new tables.- Specified by:
getCreateDispositionin interfaceLoadConfiguration- See Also:
-
getWriteDisposition
Description copied from interface:LoadConfigurationReturns the action that should occur if the destination table already exists.- Specified by:
getWriteDispositionin interfaceLoadConfiguration- See Also:
-
getNullMarker
Description copied from interface:LoadConfigurationReturns the string that represents a null value in a CSV file.- Specified by:
getNullMarkerin interfaceLoadConfiguration- See Also:
-
getCsvOptions
Description copied from interface:LoadConfigurationReturns additional properties used to parse CSV data (used whenLoadConfiguration.getFormat()is set to CSV). Returnsnullif not set.- Specified by:
getCsvOptionsin interfaceLoadConfiguration
-
getParquetOptions
-
getDatastoreBackupOptions
Description copied from interface:LoadConfigurationReturns additional options used to load from a Cloud datastore backup.- Specified by:
getDatastoreBackupOptionsin interfaceLoadConfiguration
-
getFormat
Description copied from interface:LoadConfigurationReturns the format of the data files.- Specified by:
getFormatin interfaceLoadConfiguration
-
getMaxBadRecords
Description copied from interface:LoadConfigurationReturns 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.- Specified by:
getMaxBadRecordsin interfaceLoadConfiguration
-
getSchema
Description copied from interface:LoadConfigurationReturns the schema for the destination table, if set. Returnsnullotherwise.- Specified by:
getSchemain interfaceLoadConfiguration
-
ignoreUnknownValues
Description copied from interface:LoadConfigurationReturns whether BigQuery should allow extra values that are not represented in the table schema. Iftrue, the extra values are ignored. Iftrue, 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.- Specified by:
ignoreUnknownValuesin interfaceLoadConfiguration
-
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. -
getFileSetSpecType
-
getColumnNameCharacterMap
Returns the column name character map used in CSV/Parquet loads.- See Also:
-
getDecimalTargetTypes
Description copied from interface:LoadConfigurationReturns 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.- Specified by:
getDecimalTargetTypesin interfaceLoadConfiguration
-
getAutodetect
Description copied from interface:LoadConfigurationReturns whether automatic inference of the options and schema for CSV and JSON sources is set.- Specified by:
getAutodetectin interfaceLoadConfiguration
-
getTimePartitioning
Description copied from interface:LoadConfigurationReturns the time partitioning specification defined for the destination table.- Specified by:
getTimePartitioningin interfaceLoadConfiguration
-
getClustering
Description copied from interface:LoadConfigurationReturns the clustering specification for the definition table.- Specified by:
getClusteringin interfaceLoadConfiguration
-
getUseAvroLogicalTypes
Description copied from interface:LoadConfigurationReturns True/False. Indicates whether the logical type is interpreted.- Specified by:
getUseAvroLogicalTypesin interfaceLoadConfiguration
-
getSchemaUpdateOptions
Description copied from interface:LoadConfigurationReturns 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.- Specified by:
getSchemaUpdateOptionsin interfaceLoadConfiguration
-
getLabels
Returns the labels associated with this job -
getJobTimeoutMs
Returns the timeout associated with this job -
getRangePartitioning
Returns the range partitioning specification for the table -
getHivePartitioningOptions
-
getReferenceFileSchemaUri
-
getConnectionProperties
-
getCreateSession
-
getReservation
Returns the reservation associated with this job -
toBuilder
Description copied from class:JobConfigurationReturns a builder for the object.- Specified by:
toBuilderin interfaceLoadConfiguration- Specified by:
toBuilderin classJobConfiguration
-
equals
-
hashCode
public int hashCode() -
newBuilder
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. -
builder
Creates a builder for a BigQuery Load Job configuration given the destination table and source URI. -
newBuilder
Creates a builder for a BigQuery Load Job configuration given the destination table and source URI. -
newBuilder
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. -
newBuilder
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. -
of
Returns a BigQuery Load Job Configuration for the given destination table and source URIs. -
of
Returns a BigQuery Load Job Configuration for the given destination table and source URI. -
of
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. -
of
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.
-