As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

google.cloud.bigquery.job.ExtractJobConfig

class google.cloud.bigquery.job.ExtractJobConfig(**kwargs)[source]

Configuration options for extract jobs.

All properties in this class are optional. Values which are None -> server defaults. Set properties on the constructed configuration by using the property name as the name of a keyword argument.

__init__(**kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(**kwargs)

Initialize self.

from_api_repr(resource)

Factory: construct a job configuration given its API representation

to_api_repr()

Build an API representation of the job config.

Attributes

compression

Compression type to use for exported files.

destination_format

Exported file format.

field_delimiter

Delimiter to use between fields in the exported data.

job_timeout_ms

Optional parameter.

labels

Labels for the job.

print_header

Print a header row in the exported data.

use_avro_logical_types

For loads of Avro data, governs whether Avro logical types are converted to their corresponding BigQuery types (e.g.

__setattr__(name, value)

Override to be able to raise error if an unknown property is being set

property compression

Compression type to use for exported files.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationExtract.FIELDS.compression

Type

google.cloud.bigquery.job.Compression

property destination_format

Exported file format.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationExtract.FIELDS.destination_format

Type

google.cloud.bigquery.job.DestinationFormat

property field_delimiter

Delimiter to use between fields in the exported data.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationExtract.FIELDS.field_delimiter

Type

str

classmethod from_api_repr(resource: dict)google.cloud.bigquery.job.base._JobConfig

Factory: construct a job configuration given its API representation

Parameters

resource (Dict) – A job configuration in the same representation as is returned from the API.

Returns

Configuration parsed from resource.

Return type

google.cloud.bigquery.job._JobConfig

property job_timeout_ms

Optional parameter. Job timeout in milliseconds. If this time limit is exceeded, BigQuery might attempt to stop the job. https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfiguration.FIELDS.job_timeout_ms e.g.

job_config = bigquery.QueryJobConfig( job_timeout_ms = 5000 ) or job_config.job_timeout_ms = 5000

Raises

ValueError – If value type is invalid.

property labels

Labels for the job.

This method always returns a dict. Once a job has been created on the server, its labels cannot be modified anymore.

Raises

ValueError – If value type is invalid.

Type

Dict[str, str]

property print_header

Print a header row in the exported data.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfigurationExtract.FIELDS.print_header

Type

bool

to_api_repr()dict

Build an API representation of the job config.

Returns

A dictionary in the format used by the BigQuery API.

Return type

Dict

property use_avro_logical_types

For loads of Avro data, governs whether Avro logical types are converted to their corresponding BigQuery types (e.g. TIMESTAMP) rather than raw types (e.g. INTEGER).

Type

bool