Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the bq command line support writeDisposition : WRITE_TRUNCATE?

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: https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.load

Thanks.

like image 368
DataDives Avatar asked Mar 20 '15 03:03

DataDives


People also ask

What is Write_truncate BigQuery?

Specifies the action that occurs if the destination table already exists. The following values are supported: WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the table data and uses the schema from the query result. WRITE_APPEND: If the table already exists, BigQuery appends the data to the table.

Can you create temp tables in BigQuery?

Temporary and permanent tables BigQuery uses temporary tables to cache query results that aren't written to a permanent table. The tables are created in a special dataset and named randomly. You can also create temporary tables for your own use.

What is bq command line?

The bq command-line tool is a Python-based command-line tool for BigQuery. This page contains general information about using the bq command-line tool. For a complete reference of all bq commands and flags, see the bq command-line tool reference.


1 Answers

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

like image 181
shollyman Avatar answered Oct 12 '22 05:10

shollyman