Package com.google.cloud.bigquery
Class ExtractJobConfiguration.Builder
- java.lang.Object
-
- com.google.cloud.bigquery.JobConfiguration.Builder<ExtractJobConfiguration,ExtractJobConfiguration.Builder>
-
- com.google.cloud.bigquery.ExtractJobConfiguration.Builder
-
- Enclosing class:
- ExtractJobConfiguration
public static final class ExtractJobConfiguration.Builder extends JobConfiguration.Builder<ExtractJobConfiguration,ExtractJobConfiguration.Builder>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtractJobConfigurationbuild()Creates an object.ExtractJobConfiguration.BuildersetCompression(String compression)Sets the compression value to use for exported files.ExtractJobConfiguration.BuildersetDestinationUris(List<String> destinationUris)Sets the list of fully-qualified Google Cloud Storage URIs (e.g.ExtractJobConfiguration.BuildersetFieldDelimiter(String fieldDelimiter)Sets the delimiter to use between fields in the exported data.ExtractJobConfiguration.BuildersetFormat(String format)Sets the exported file format.ExtractJobConfiguration.BuildersetJobTimeoutMs(Long jobTimeoutMs)[Optional] Job timeout in milliseconds.ExtractJobConfiguration.BuildersetLabels(Map<String,String> labels)The labels associated with this job.ExtractJobConfiguration.BuildersetPrintHeader(Boolean printHeader)Sets whether to print out a header row in the results.ExtractJobConfiguration.BuildersetSourceModel(ModelId sourceModel)Sets the model to export.ExtractJobConfiguration.BuildersetSourceTable(TableId sourceTable)Sets the table to export.ExtractJobConfiguration.BuildersetUseAvroLogicalTypes(Boolean useAvroLogicalTypes)[Optional] If destinationFormat is set to "AVRO", this flag indicates whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long).
-
-
-
Method Detail
-
setSourceTable
public ExtractJobConfiguration.Builder setSourceTable(TableId sourceTable)
Sets the table to export.
-
setSourceModel
public ExtractJobConfiguration.Builder setSourceModel(ModelId sourceModel)
Sets the model to export.
-
setDestinationUris
public ExtractJobConfiguration.Builder setDestinationUris(List<String> destinationUris)
Sets the list of fully-qualified Google Cloud Storage URIs (e.g. gs://bucket/path) where the extracted table should be written.
-
setPrintHeader
public ExtractJobConfiguration.Builder setPrintHeader(Boolean printHeader)
Sets whether to print out a header row in the results. By default an header is printed.
-
setFieldDelimiter
public ExtractJobConfiguration.Builder setFieldDelimiter(String fieldDelimiter)
Sets the delimiter to use between fields in the exported data. By default "," is used.
-
setFormat
public ExtractJobConfiguration.Builder setFormat(String format)
Sets the exported file format. If not set table is exported in CSV format.
-
setCompression
public ExtractJobConfiguration.Builder setCompression(String compression)
Sets the compression value to use for exported files. If not set exported files are not compressed.
-
setUseAvroLogicalTypes
public ExtractJobConfiguration.Builder setUseAvroLogicalTypes(Boolean useAvroLogicalTypes)
[Optional] If destinationFormat is set to "AVRO", this flag indicates whether to enable extracting applicable column types (such as TIMESTAMP) to their corresponding AVRO logical types (timestamp-micros), instead of only using their raw types (avro-long).- Parameters:
useAvroLogicalTypes- useAvroLogicalTypes ornullfor none
-
setLabels
public ExtractJobConfiguration.Builder setLabels(Map<String,String> labels)
The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.- Parameters:
labels- labels ornullfor none
-
setJobTimeoutMs
public ExtractJobConfiguration.Builder setJobTimeoutMs(Long jobTimeoutMs)
[Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.- Parameters:
jobTimeoutMs- jobTimeoutMs ornullfor none
-
build
public ExtractJobConfiguration build()
Description copied from class:JobConfiguration.BuilderCreates an object.- Specified by:
buildin classJobConfiguration.Builder<ExtractJobConfiguration,ExtractJobConfiguration.Builder>
-
-