How can I delete / truncate data in a table using the command line in a large query?

What is the command to execute DML like Insert, Update, Delete in Google Big Query?

I tried using bq "select query"

It only works for Select statements

+1


source to share


1 answer


Please note that BigQuery really stands out as a secondary database used to perform fast analytic queries on big statistical data such as analysis of recorded data, logs and audit history.

If you require regular data updates, it is highly recommended to use a separate underlying database such as the Datastore to perform quick operations and object updates. You then save your data from your primary database to your secondary BigQuery database for further analysis.




Therefore, you must tell the bq command line to use full standard SQL --use_legacy_sql=false

instead of the original BigQuery default legacy SQL in order to access the Data Manipulation Language (DML) feature .

+1


source







All Articles