Does bq support writeDisposition: WRITE_TRUNCATE on the command line?

I am wondering if the bq command line utility supports the writeDisposition: WRITE_TRUNCATE parameter. I carefully searched for documents and helped with the bq team. Is it possible to specify configuration.load.writeDisposition using the bq utility? The command line utility is great, I hope it is supported with it.

In the API, this is of course: https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.load

Thanks.

+6
source share
3 answers

I believe that -replace should set that write_disposition will be truncated in places in the BQ cli where it is needed (e.g. bq loading).

+7
source

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

bq help load 

bla ..

bla ..

- [no] replace: If true, delete existing content before loading new data. (default: "false")

2) Your team will be something like this

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

The official documentation contains three flags and the one you need --replace

Adding or overwriting a table with JSON data

0
source

Source: https://habr.com/ru/post/984033/


All Articles