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
PR with a proposed backwards-compatible fix and more information: #132
check-model-parents-schema does not work as expected. Because the schema is parsed from nodes → schema as dev_dim_schema_name rather than dim_schema_name (which is found in nodes → config → schema), the check doesn't work as expected.
Essentially, the schema being parsed is the wrong schema.
Incorrect: nodes → schema
Correct: nodes → config → schema
Replacing allowed_schema_name with the allowed schema name for whitelist or a disallowed one for blacklist.
3. Check the output and if the failure is like the below then it's an issue:
Check parent models or sources are from certain schema.......................Failed
- hook id: check-model-parents-schema
- exit code: 1
example_int_model: has parent example_stg_model with invalid schema dbt_myproject_test_kilian_tscherny_allowed_schema_name.
We can see here than technically the parent model does have the allowed_schema_name but because it is prefixed by the name of my own output dev dataset (dbt_myproject_test_kilian_tscherny), it's flagged as an error.
Expected behavior
The check should be selecting from the "nested" schema that's inside config, we get the "true" schema name reliably every time, for each developer and in production.
Version:
v1.1.0
Additional context
I've tested this on 2 separate BigQuery-based projects as well as 1 Snowflake-based project and had the same issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
PR with a proposed backwards-compatible fix and more information: #132
check-model-parents-schema
does not work as expected. Because the schema is parsed fromnodes → schema
asdev_dim_schema_name
rather thandim_schema_name
(which is found innodes → config → schema
), the check doesn't work as expected.Essentially, the schema being parsed is the wrong schema.
Incorrect:
nodes → schema
Correct:
nodes → config → schema
To Reproduce
Steps to reproduce the behavior:
Replacing
allowed_schema_name
with the allowed schema name for whitelist or a disallowed one for blacklist.3. Check the output and if the failure is like the below then it's an issue:
We can see here than technically the parent model does have the
allowed_schema_name
but because it is prefixed by the name of my own output dev dataset (dbt_myproject_test_kilian_tscherny
), it's flagged as an error.Expected behavior
The check should be selecting from the "nested" schema that's inside config, we get the "true" schema name reliably every time, for each developer and in production.
Version:
v1.1.0
Additional context
I've tested this on 2 separate BigQuery-based projects as well as 1 Snowflake-based project and had the same issue.
The text was updated successfully, but these errors were encountered: