Skip to content
Advertisement

Tag: bq

Efficient syntax to update 5K rows in BQ table

I’m trying to update ~5K rows in bq using python client. Here is my current try: and How can I map the account id list to a string as follows which seems more efficient(?) UPDATE mytable SET somefield=( CASE WHEN (id=100) THEN ‘some value removed’ WHEN (id=101) THEN ‘some value removed’ END ) WHERE id IN (100,101); I’ve tried: Plus

BigQuery cli bq how to use EXECUTE IMMEDIATE script

I would like to use two SQL scripts to create and update a table in BigQuery using bq query command. Here are the two scripts : 1- Creating the table 2- updating the table When using these two scripts as queries with the bq query command, I have got an error : Is there any other way to do that?

Advertisement