You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using dbt-external-tables with BigQuery and Project-Names containing numbers and apparently end with a number, references to that project-name must be quoted with backticks.
Steps to reproduce
Use the package together with Google-Project-Names ending with a number and an error: Syntax error: Missing whitespace between literal and alias at [4:50]
is returned
Expected results
No error... but a newly created or existing schema
Actual results
Script stops with an error Syntax error: Missing whitespace between literal and alias at [4:50]
Screenshots and log output
The output of dbt --version:
Running with dbt=1.3.7
The operating system you're using:
Windows / Linux
The output of python --version:
3.10.9
Additional context
macros/plugins/bigquery/create_external_schema.sql {% set schema_exists_query %} select * from {{ source_node.database }}.INFORMATION_SCHEMA.SCHEMATA where schema_name = '{{ source_node.schema }}' limit 1 {% endset %}
should be {% set schema_exists_query %} select * from `{{ source_node.database }}`.INFORMATION_SCHEMA.SCHEMATA where schema_name = '{{ source_node.schema }}' limit 1 {% endset %}
The text was updated successfully, but these errors were encountered:
Describe the bug
When using dbt-external-tables with BigQuery and Project-Names containing numbers and apparently end with a number, references to that project-name must be quoted with backticks.
Steps to reproduce
Use the package together with Google-Project-Names ending with a number and an error:
Syntax error: Missing whitespace between literal and alias at [4:50]
is returned
Expected results
No error... but a newly created or existing schema
Actual results
Script stops with an error
Syntax error: Missing whitespace between literal and alias at [4:50]
Screenshots and log output
The output of
dbt --version
:The operating system you're using:
Windows / Linux
The output of
python --version
:3.10.9
Additional context
macros/plugins/bigquery/create_external_schema.sql
{% set schema_exists_query %} select * from {{ source_node.database }}.INFORMATION_SCHEMA.SCHEMATA where schema_name = '{{ source_node.schema }}' limit 1 {% endset %}
should be
{% set schema_exists_query %} select * from `{{ source_node.database }}`.INFORMATION_SCHEMA.SCHEMATA where schema_name = '{{ source_node.schema }}' limit 1 {% endset %}
The text was updated successfully, but these errors were encountered: