python
update data from table
query="""
UPDATE datalab.jmb_deliveries
SET ot_client_order_ind = CASE
WHEN delivery_date>promise_date THEN 0
ELSE 1
END
WHERE
client_order_ind = 1
"""
query_job = client.query(
query,
# Location must match that of the dataset(s) referenced in the query.
location="EU"
)
query_job.result(timeout=120)
Was this helpful?
Similar Posts