I tried to set up anchoring while declaring tests as recommended here: https://docs.getdbt.com/docs/building-a-dbt-project/testing-and-documentation/testing/
But i can’t figure out how it should work. I have this example:
columns: &columns - '"date"' models: - name: ga_data tests: - not_null: column_name: *columns
But what i get is an error message:
001003 (42000): SQL compilation error: syntax error line 3 at position 6 unexpected '['.
This is the SQL that is put into target/schema_test:
select count(*) from XXXXXX.GOOGLE_ANALYTICS.ga_data where ['"date"'] is null
Can you help me out?
Ultimately, I want to have an easy way of testing ALL columns in a model for not_null without have to retype everything for each column.