Package com.google.cloud.bigquery
Class WriteChannelConfiguration
java.lang.Object
com.google.cloud.bigquery.WriteChannelConfiguration
- All Implemented Interfaces:
LoadConfiguration
,Serializable
public final class WriteChannelConfiguration
extends Object
implements LoadConfiguration, Serializable
Google BigQuery Configuration for a load operation. A load configuration can be used to load data
into a table with a
WriteChannel
(BigQuery.writer(WriteChannelConfiguration)
).- See Also:
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionboolean
[Experimental] Returns whether automatic inference of the options and schema for CSV and JSON sources is set.Returns the clustering specification for the definition table.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 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 schema for the destination table, if set.[Experimental] Returns options allowing the schema of the destination table to be updated as a side effect of the load job.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.int
hashCode()
Returns whether BigQuery should allow extra values that are not represented in the table schema.newBuilder
(TableId destinationTable) Creates a builder for a BigQuery Load Configuration given the destination table.newBuilder
(TableId destinationTable, FormatOptions format) Creates a builder for a BigQuery Load Configuration given the destination table and format.static WriteChannelConfiguration
Returns a BigQuery Load Configuration for the given destination table.static WriteChannelConfiguration
of
(TableId destinationTable, FormatOptions format) Returns a BigQuery Load Configuration for the given destination table and format.Returns a builder for the load configuration object.toString()
-
Constructor Details
-
WriteChannelConfiguration
-
-
Method Details
-
getDestinationTable
Description copied from interface:LoadConfiguration
Returns the destination table to load the data into.- Specified by:
getDestinationTable
in interfaceLoadConfiguration
-
getDestinationEncryptionConfiguration
- Specified by:
getDestinationEncryptionConfiguration
in interfaceLoadConfiguration
-
getCreateDisposition
Description copied from interface:LoadConfiguration
Returns whether the job is allowed to create new tables.- Specified by:
getCreateDisposition
in interfaceLoadConfiguration
- See Also:
-
getWriteDisposition
Description copied from interface:LoadConfiguration
Returns the action that should occur if the destination table already exists.- Specified by:
getWriteDisposition
in interfaceLoadConfiguration
- See Also:
-
getNullMarker
Description copied from interface:LoadConfiguration
Returns the string that represents a null value in a CSV file.- Specified by:
getNullMarker
in interfaceLoadConfiguration
- See Also:
-
getCsvOptions
Description copied from interface:LoadConfiguration
Returns additional properties used to parse CSV data (used whenLoadConfiguration.getFormat()
is set to CSV). Returnsnull
if not set.- Specified by:
getCsvOptions
in interfaceLoadConfiguration
-
getMaxBadRecords
Description copied from interface:LoadConfiguration
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.- Specified by:
getMaxBadRecords
in interfaceLoadConfiguration
-
getSchema
Description copied from interface:LoadConfiguration
Returns the schema for the destination table, if set. Returnsnull
otherwise.- Specified by:
getSchema
in interfaceLoadConfiguration
-
getFormat
Description copied from interface:LoadConfiguration
Returns the format of the data files.- Specified by:
getFormat
in interfaceLoadConfiguration
-
ignoreUnknownValues
Description copied from interface:LoadConfiguration
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.- Specified by:
ignoreUnknownValues
in interfaceLoadConfiguration
-
getDatastoreBackupOptions
Description copied from interface:LoadConfiguration
Returns additional options used to load from a Cloud datastore backup.- Specified by:
getDatastoreBackupOptions
in interfaceLoadConfiguration
-
getSchemaUpdateOptions
Description copied from interface:LoadConfiguration
[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.- Specified by:
getSchemaUpdateOptions
in interfaceLoadConfiguration
-
getAutodetect
Description copied from interface:LoadConfiguration
[Experimental] Returns whether automatic inference of the options and schema for CSV and JSON sources is set.- Specified by:
getAutodetect
in interfaceLoadConfiguration
-
getTimePartitioning
Description copied from interface:LoadConfiguration
Returns the time partitioning specification defined for the destination table.- Specified by:
getTimePartitioning
in interfaceLoadConfiguration
-
getClustering
Description copied from interface:LoadConfiguration
Returns the clustering specification for the definition table.- Specified by:
getClustering
in interfaceLoadConfiguration
-
getUseAvroLogicalTypes
Description copied from interface:LoadConfiguration
Returns True/False. Indicates whether the logical type is interpreted.- Specified by:
getUseAvroLogicalTypes
in interfaceLoadConfiguration
-
getLabels
-
getDecimalTargetTypes
Description copied from interface:LoadConfiguration
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.- Specified by:
getDecimalTargetTypes
in interfaceLoadConfiguration
-
getConnectionProperties
-
getCreateSession
-
toBuilder
Description copied from interface:LoadConfiguration
Returns a builder for the load configuration object.- Specified by:
toBuilder
in interfaceLoadConfiguration
-
toString
-
equals
-
hashCode
public int hashCode() -
newBuilder
Creates a builder for a BigQuery Load Configuration given the destination table. -
newBuilder
public static WriteChannelConfiguration.Builder newBuilder(TableId destinationTable, FormatOptions format) Creates a builder for a BigQuery Load Configuration given the destination table and format. -
of
Returns a BigQuery Load Configuration for the given destination table. -
of
Returns a BigQuery Load Configuration for the given destination table and format.
-