google bigquery - Does the bq command line support writeDisposition : WRITE_TRUNCATE?

Keywords:google  bigquery 


I am wondering if the bq command line utility supports the writeDisposition : WRITE_TRUNCATE option. I have searched the docs thoroughly, and help within bq command. Is it possible to specify configuration.load.writeDisposition with the bq utility? The command line utility is great, hopefully it is supported with it.

In the API it is of course:


3 Answers: 

I believe --replace should set the write_disposition to truncate in places in the BQ cli where relevant (such as bq load).


1) If you do "bq help load", it will show the --replace global_flag

bq help load

bla ..

bla ..

--[no]replace: If true erase existing contents before loading new data. (default: 'false')

2) Your command will be something like this

bq load --replace --project_id=your_project_id <destination_table> <source> [<schema>]

Official documentation states three flags and the one you need is --replace

Appending to or overwriting a table with JSON data