← BigQuery556 / 640
hardbq

Export a BigQuery table to compressed CSV files in Cloud Storage

command

bq extract --compression=GZIP --destination_format=CSV DATASET.TABLE gs://BUCKET/export_*.csv.gz

also accepted

bq extract --compressionbq extract --compression=GZIP

Command breakdown

Part of the BigQuery CLI (bq) — BigQuery category.

bqextract--compression=GZIP--destination_format=CSVDATASET.TABLEgs://BUCKET/export_*.csv.gz
FlagPurpose
--compressionSet to: GZIP
--destination_formatSet to: CSV

Test your recall — not just your reading.

Practice with interactive quiz →