I have a query that generates rows for insertion into a table. The query references tables in different projects. The project names include hyphen (ex. abc-xyz). When I try to use bq command and use ` to enclose the project name I get error and if I don't I get error and if I try single or double quotes or brackets still get error. Is there a way to reference another project that has hyphen in its name in a query using bq command?
Here is what I get when I run a sample command:
bq query --use_legacy_sql=false "select account_id, max(updated) max_updated, max(_PARTITIONTIME) max_pt from abc-xyz.myset.mytable group by 1"
-bash: abc-xyz: command not found
When I copy and paste that same query strin in the UI, it works fine.
Thanks