Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Streaming Inserts during BigQuery Overwrite Job

I have a BigQuery table and I want to use a job with writeDisposition WRITE_TRUNCATE to overwrite the table with a subset of its rows. I am doing this because I'm trying to mimic a DELETE FROM … WHERE … operation.

Suppose while the job is running, I am simultaneously trying to stream rows into the table. Is it possible for rows to be inserted while the job is running and so be overwritten when the job completes? Or is there a locking mechanism that will prevent the rows from being inserted until the job finishes?

like image 371
mhuston Avatar asked Mar 16 '26 05:03

mhuston


1 Answers

In this case you need to stop the streaming jobs until you do your operation. And resume once you are done with it. There is no locking.

Also you should allow some cooling down period after you stop streaming inserts, as they are processed in background and you need to let the system to finish.

like image 132
Pentium10 Avatar answered Mar 19 '26 01:03

Pentium10



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!