In PR #460 one of the fields that is used for filtering exceptions in fct_missing_primary_key_tests was removed. Specifically model_type and resource_type. It doesn't look intentional as it wasn't called out explicitly so I assume it's a bug rather than a design choice. The change is here
Steps to reproduce
Include a record within dbt_project_evaluator_exceptions that makes use of model_type as a filter:
fct_missing_primary_key_tests,model_type,example_model_type,Models do not have uniqueness available
Then try to run the test and the table won't build.
Expected results
The table builds using the same fields available as previously.
Actual results
The table errors.
Screenshots and log output
Runtime Error in model fct_missing_primary_key_tests (models/marts/tests/fct_missing_primary_key_tests.sql)
[UNRESOLVED_COLUMN.WITH_SUGGESTION] A column, variable, or function parameter with name `model_type` cannot be resolved. Did you mean one of the following? [`resource_name`, `is_primary_key_tested`, `number_of_tests_on_model`, `number_of_constraints_on_model`]. SQLSTATE: 42703; line 37 pos 20
Describe the bug
In PR #460 one of the fields that is used for filtering exceptions in
fct_missing_primary_key_tests
was removed. Specificallymodel_type
andresource_type
. It doesn't look intentional as it wasn't called out explicitly so I assume it's a bug rather than a design choice. The change is hereSteps to reproduce
Include a record within
dbt_project_evaluator_exceptions
that makes use ofmodel_type
as a filter:Then try to run the test and the table won't build.
Expected results
The table builds using the same fields available as previously.
Actual results
The table errors.
Screenshots and log output
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:Additional context
See above for details of the line of code
Are you interested in contributing the fix?
Yes - I'll create a PR shortly