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
Nice to meet you and thank you for the great OSS.
When using backticks to quote schema and table names in BigQuery queries, the depends_on field in the generated exposures.yml file is empty.
In BigQuery, schema and table names must be quoted with backticks. Documentation
Example 1: Using backticks (fails)
Metabase Query:
SELECT*FROM`work.transactions`
Generated exposures.yml:
depends_on: []
Example 2: Without backticks (works but breaks Metabase Field filters)
Metabase Query:
SELECT*FROMwork.transactions
Generated exposures.yml:
depends_on:
- ref('payments')
Expected Behavior
The depends_on field should correctly capture dependencies even when schema and table names are quoted with backticks, as required by BigQuery's syntax.
Environment
dbt-bigquery: 1.8.0
dbt-core: 1.8.3
dbt-metabase: 1.4.1
Steps to Reproduce
Create a query in Metabase that uses backticks to quote schema and table names.
Run the dbt-metabase sync process.
Check the exposures.yml file and observe that depends_on is empty.
Would it be possible to enhance dbt-metabase to correctly parse dependencies from queries that use backticks in BigQuery?
The text was updated successfully, but these errors were encountered:
"query": "select\n count(*)\nfrom STG_payments as p\n left join STG_orders as o on p.order_id = o.order_id\nwhere o.status = 'returned'\n;"
}
},
The code and regular expression for extracting the schema name and table name from a query like this are defined below, and I think that if you modify it to extend this, you should be able to extract ref correctly even in cases that include backquotes.
Nice to meet you and thank you for the great OSS.
When using backticks to quote schema and table names in BigQuery queries, the depends_on field in the generated exposures.yml file is empty.
In BigQuery, schema and table names must be quoted with backticks. Documentation
Example 1: Using backticks (fails)
Metabase Query:
Generated
exposures.yml
:Example 2: Without backticks (works but breaks Metabase Field filters)
Metabase Query:
Generated
exposures.yml
:Expected Behavior
The
depends_on
field should correctly capture dependencies even when schema and table names are quoted with backticks, as required by BigQuery's syntax.Environment
Steps to Reproduce
dbt-metabase
sync process.exposures.yml
file and observe thatdepends_on
is empty.Would it be possible to enhance
dbt-metabase
to correctly parse dependencies from queries that use backticks in BigQuery?The text was updated successfully, but these errors were encountered: