I am running a DELETE FROM job on a BigQuery table using the python API. I am trying to make my code as reusable as possible by adding a variable for the table which can be scanned, for example:
dml_statement = (
"""
DELETE FROM `my_project.my_dateset.detail_@market`
WHERE order_date = @date
""")
This unfortunately returns the error:
NotFound: 404 Not found: Table my_project:my_dataset.detail_@market was not found in location EU
If I cannot use variables in the FROM clause is there any other way I can make the selected table a dynamic input?
I also tried using wildcards and _TABLE_SUFFIX, but wildcard selections are not allowed with DELETE queries.