Class WriteChannelConfiguration (2.37.0)

public final class WriteChannelConfiguration implements LoadConfiguration, Serializable

Google BigQuery Configuration for a load operation. A load configuration can be used to load data into a table with a com.google.cloud.WriteChannel (BigQuery#writer(WriteChannelConfiguration)).

Inheritance

Object > WriteChannelConfiguration

Static Methods

newBuilder(TableId destinationTable)

public static WriteChannelConfiguration.Builder newBuilder(TableId destinationTable)

Creates a builder for a BigQuery Load Configuration given the destination table.

Parameter
NameDescription
destinationTableTableId
Returns
TypeDescription
WriteChannelConfiguration.Builder

newBuilder(TableId destinationTable, FormatOptions format)

public static WriteChannelConfiguration.Builder newBuilder(TableId destinationTable, FormatOptions format)

Creates a builder for a BigQuery Load Configuration given the destination table and format.

Parameters
NameDescription
destinationTableTableId
formatFormatOptions
Returns
TypeDescription
WriteChannelConfiguration.Builder

of(TableId destinationTable)

public static WriteChannelConfiguration of(TableId destinationTable)

Returns a BigQuery Load Configuration for the given destination table.

Parameter
NameDescription
destinationTableTableId
Returns
TypeDescription
WriteChannelConfiguration

of(TableId destinationTable, FormatOptions format)

public static WriteChannelConfiguration of(TableId destinationTable, FormatOptions format)

Returns a BigQuery Load Configuration for the given destination table and format.

Parameters
NameDescription
destinationTableTableId
formatFormatOptions
Returns
TypeDescription
WriteChannelConfiguration

Constructors

WriteChannelConfiguration(WriteChannelConfiguration.Builder builder)

protected WriteChannelConfiguration(WriteChannelConfiguration.Builder builder)
Parameter
NameDescription
builderWriteChannelConfiguration.Builder

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAutodetect()

public Boolean getAutodetect()

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

Returns
TypeDescription
Boolean

getClustering()

public Clustering getClustering()

Returns the clustering specification for the definition table.

Returns
TypeDescription
Clustering

getConnectionProperties()

public List<ConnectionProperty> getConnectionProperties()
Returns
TypeDescription
List<ConnectionProperty>

getCreateDisposition()

public JobInfo.CreateDisposition getCreateDisposition()

Returns whether the job is allowed to create new tables.

Returns
TypeDescription
JobInfo.CreateDisposition

getCreateSession()

public Boolean getCreateSession()
Returns
TypeDescription
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
TypeDescription
CsvOptions

getDatastoreBackupOptions()

public DatastoreBackupOptions getDatastoreBackupOptions()

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

Returns
TypeDescription
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
TypeDescription
List<String>

getDestinationEncryptionConfiguration()

public EncryptionConfiguration getDestinationEncryptionConfiguration()
Returns
TypeDescription
EncryptionConfiguration

getDestinationTable()

public TableId getDestinationTable()

Returns the destination table to load the data into.

Returns
TypeDescription
TableId

getFormat()

public String getFormat()

Returns the format of the data files.

Returns
TypeDescription
String

getLabels()

public Map<String,String> getLabels()
Returns
TypeDescription
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
TypeDescription
Integer

getNullMarker()

public String getNullMarker()

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

Returns
TypeDescription
String

getSchema()

public Schema getSchema()

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

Returns
TypeDescription
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
TypeDescription
List<SchemaUpdateOption>

getTimePartitioning()

public TimePartitioning getTimePartitioning()

Returns the time partitioning specification defined for the destination table.

Returns
TypeDescription
TimePartitioning

getUseAvroLogicalTypes()

public Boolean getUseAvroLogicalTypes()

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

Returns
TypeDescription
Boolean

getWriteDisposition()

public JobInfo.WriteDisposition getWriteDisposition()

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

Returns
TypeDescription
JobInfo.WriteDisposition

hashCode()

public int hashCode()
Returns
TypeDescription
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
TypeDescription
Boolean

toBuilder()

public WriteChannelConfiguration.Builder toBuilder()

Returns a builder for the load configuration object.

Returns
TypeDescription
WriteChannelConfiguration.Builder

toString()

public String toString()
Returns
TypeDescription
String
Overrides