Quantcast
Viewing latest article 1
Browse Latest Browse All 354

Answer by David McNeill for How to delete or empty a table that is in BigQuery using Python

You can't truncate directly.

The --replace parameter to a bq cli load job has the effect you want, clearing out the existing data. Also referred to as WRITE_TRUNCATE when using API mode.

bq load --autodetect --replace --source_format=NEWLINE_DELIMITED_JSON mydataset.mytable gs://mybucket/mydata.json

Viewing latest article 1
Browse Latest Browse All 354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>