Videz la table dans GCS au format de compression CSV GZIP.
environnement
code
from google.cloud.bigquery import Client
from google.cloud.bigquery.job import ExtractJobConfig, DestinationFormat, Compression, ExtractJob
client = Client(project="your_prject_id", location="US")
job_config: ExtractJobConfig = ExtractJobConfig(
compression=Compression.GZIP,
destination_format=DestinationFormat.CSV
)
extract_job: ExtractJob = client.extract_table(
source="your_dataset.your_table",
destination_uris="gs://your_bucket/hoge.csv.gz",
job_config=job_config)
extract_job.result() #Attendez la fin
Recommended Posts