What's the problem
I'm trying to use DML where one of the columns being worked with has the same name as an internal BigQuery function, in this case hash.
Attempting to use column in any DML returns:
Syntax error: Unexpected keyword HASH at [line]
Is it possible to somehow tell BigQuery to ignore the formula and treat it as a string?
I've come across this table and need to migrate the column type of other columns in the table from FLOAT to INT.
Everything else, the partitions etc. (including the column hash) should ideally be preserved.
Typically I would do this with DML, but because of the hash problem above I can't do that with insert. I got around re-creating the table using bq cli, but can't figure out how to do it with insert.
There's a lot of legacy here, do I need to convince people to rename the column or can I just nicely work around this.
Answer via Jaytiger in the comments.
Wrapping it in backticks solved the problem i.e.: