rmg
rmg

Reputation: 1089

Extract files from GBQ to GCS without csv header using bq command line

Is it possible to run a command like:

bq extract <source_table> <destination_uris>

and use a flag to export without the csv header? Similar to the API flag mentioned here, but without using the API- just via bq extract...

Upvotes: 3

Views: 4480

Answers (1)

Felipe Hoffa
Felipe Hoffa

Reputation: 59175

Use:

bq extract --noprint_header <source_table> <destination_uris> 

You can find this option from the output of:

bq help extract

[...]
--[no]print_header: Whether to print header rows for formats that have headers.
Prints headers by default.

Upvotes: 7

Related Questions