LewisDavies / upstream-prod

A dbt package for easily using production data in a development environment.
32 stars 4 forks source link

BigQuery breaks in `get_table_update_ts` due to missing backticks #37

Open davidwitk opened 3 months ago

davidwitk commented 3 months ago

get_table_update_ts.sql queries the information schema several times, for example here:

https://github.com/LewisDavies/upstream-prod/blob/acbb79be52376c0ce38fb102f47ff11bc7918d33/macros/get_table_update_ts.sql#L13

The queries fail on BigQuery because it expects backticks. For example, changing

{{ relation.database }}.information_schema.tables

to

`{{ relation.database }}.information_schema.tables`

does the fix. I guess one way to handle this could be to handle BigQuery in a separate condition?