Class ExtractJob (3.33.0)

ExtractJob(job_id, source, destination_uris, client, job_config=None)

Asynchronous job: extract data from a table into Cloud Storage.

Parameters

Name Description
job_id str

the job's ID.

source Union[ google.cloud.bigquery.table.TableReference, google.cloud.bigquery.model.ModelReference ]

Table or Model from which data is to be loaded or extracted.

destination_uris List[str]

URIs describing where the extracted data will be written in Cloud Storage, using the format gs://<bucket_name>/<object_name_or_glob>.

client google.cloud.bigquery.client.Client

A client which holds credentials and project configuration.

job_config Optional[google.cloud.bigquery.job.ExtractJobConfig]

Extra configuration options for the extract job.

Properties

compression

configuration

The configuration for this extract job.

destination_format

destination_uri_file_counts

Returns
Type Description
List[int] A list of integer counts, each representing the number of files per destination URI or URI pattern specified in the extract configuration. These values will be in the same order as the URIs specified in the 'destinationUris' field. Returns None if job is not yet complete.

destination_uris

List[str]: URIs describing where the extracted data will be written in Cloud Storage, using the format gs://<bucket_name>/<object_name_or_glob>.

field_delimiter

print_header

source

Union[ google.cloud.bigquery.table.TableReference, google.cloud.bigquery.model.ModelReference ]: Table or Model from which data is to be loaded or extracted.

Methods

from_api_repr

from_api_repr(
    resource: dict, client
) -> google.cloud.bigquery.job.extract.ExtractJob

Factory: construct a job given its API representation

Parameters
Name Description
resource Dict

dataset job representation returned from the API

client google.cloud.bigquery.client.Client

Client which holds credentials and project configuration for the dataset.

Returns
Type Description
google.cloud.bigquery.job.ExtractJob Job parsed from resource.

to_api_repr

to_api_repr()

Generate a resource for _begin.