Package com.google.cloud.bigquery
Interface LoadConfiguration
-
- All Known Implementing Classes:
LoadJobConfiguration
,WriteChannelConfiguration
public interface LoadConfiguration
Common interface for a load configuration. A load configuration (WriteChannelConfiguration
) can be used to load data into a table with aWriteChannel
(BigQuery.writer(WriteChannelConfiguration)
). A load configuration (LoadJobConfiguration
) can also be used to create a load job (JobInfo.of(JobConfiguration)
).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
LoadConfiguration.Builder
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Boolean
getAutodetect()
[Experimental] Returns whether automatic inference of the options and schema for CSV and JSON sources is set.Clustering
getClustering()
Returns the clustering specification for the definition table.JobInfo.CreateDisposition
getCreateDisposition()
Returns whether the job is allowed to create new tables.CsvOptions
getCsvOptions()
Returns additional properties used to parse CSV data (used whengetFormat()
is set to CSV).DatastoreBackupOptions
getDatastoreBackupOptions()
Returns additional options used to load from a Cloud datastore backup.List<String>
getDecimalTargetTypes()
Returns the list of possible SQL data types to which the source decimal values are converted.EncryptionConfiguration
getDestinationEncryptionConfiguration()
TableId
getDestinationTable()
Returns the destination table to load the data into.String
getFormat()
Returns the format of the data files.Integer
getMaxBadRecords()
Returns the maximum number of bad records that BigQuery can ignore when running the job.String
getNullMarker()
Returns the string that represents a null value in a CSV file.Schema
getSchema()
Returns the schema for the destination table, if set.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.TimePartitioning
getTimePartitioning()
Returns the time partitioning specification defined for the destination table.Boolean
getUseAvroLogicalTypes()
Returns True/False.JobInfo.WriteDisposition
getWriteDisposition()
Returns the action that should occur if the destination table already exists.Boolean
ignoreUnknownValues()
Returns whether BigQuery should allow extra values that are not represented in the table schema.LoadConfiguration.Builder
toBuilder()
Returns a builder for the load configuration object.
-
-
-
Method Detail
-
getDestinationTable
TableId getDestinationTable()
Returns the destination table to load the data into.
-
getDestinationEncryptionConfiguration
EncryptionConfiguration getDestinationEncryptionConfiguration()
-
getCreateDisposition
JobInfo.CreateDisposition getCreateDisposition()
Returns whether the job is allowed to create new tables.- See Also:
- Create Disposition
-
getWriteDisposition
JobInfo.WriteDisposition getWriteDisposition()
Returns the action that should occur if the destination table already exists.- See Also:
- Write Disposition
-
getNullMarker
String getNullMarker()
Returns the string that represents a null value in a CSV file.- See Also:
- Null Marker
-
getCsvOptions
CsvOptions getCsvOptions()
Returns additional properties used to parse CSV data (used whengetFormat()
is set to CSV). Returnsnull
if not set.
-
getMaxBadRecords
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.
-
getSchema
Schema getSchema()
Returns the schema for the destination table, if set. Returnsnull
otherwise.
-
getFormat
String getFormat()
Returns the format of the data files.
-
ignoreUnknownValues
Boolean ignoreUnknownValues()
Returns 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.
-
getDatastoreBackupOptions
DatastoreBackupOptions getDatastoreBackupOptions()
Returns additional options used to load from a Cloud datastore backup.
-
getSchemaUpdateOptions
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.
-
getAutodetect
Boolean getAutodetect()
[Experimental] Returns whether automatic inference of the options and schema for CSV and JSON sources is set.
-
getTimePartitioning
TimePartitioning getTimePartitioning()
Returns the time partitioning specification defined for the destination table.
-
getClustering
Clustering getClustering()
Returns the clustering specification for the definition table.
-
getUseAvroLogicalTypes
Boolean getUseAvroLogicalTypes()
Returns True/False. Indicates whether the logical type is interpreted.
-
getDecimalTargetTypes
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.
-
toBuilder
LoadConfiguration.Builder toBuilder()
Returns a builder for the load configuration object.
-
-