When running dbt run-operation dbt_external_tables.stage_external_sources command to create a table in BQ from csv file stored at gcp cloud storage, got below error:
[debug] [MainThread]: BigQuery adapter: Database Error
Syntax error: Missing whitespace between literal and alias at [5:12]
I looked into the dtb.log file. It seems the query syntax running at the backend (I assume handled by the package macro) is wrong:
select * from gcp_prj_id.INFORMATION_SCHEMA.SCHEMATA where schema_name = 'my_schema' limit 1
Here the gcp_prj_id should be quoted by back quotes `.
Anyone knows how to fix this issue? Thanks!