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
Wrap DBT models/tests in {% model %}...{% endmodel %} blocks
Feature description
When we read in a sql file that is a model, we should optionally wrap it in a {% model %} block. Then we should run dbt's top-level jinja block parser over it and make sure the output matches the contents of the sql file, and either raise or log a warning.
Model blocks should probably be named using the basename of the sql file they were found in just for coherency, but it doesn't really matter.
This should be behind a (hidden?) flag to dbt compile/run.
We should do the same when generating tests - after we build the string, wrap it in a block, extract that block, and make sure it matches.
Who will this benefit?
This will help us shake out any bugs around block parsing.
The text was updated successfully, but these errors were encountered:
Feature
Wrap DBT models/tests in
{% model %}...{% endmodel %}
blocksFeature description
When we read in a sql file that is a model, we should optionally wrap it in a
{% model %}
block. Then we should run dbt's top-level jinja block parser over it and make sure the output matches the contents of the sql file, and either raise or log a warning.Model blocks should probably be named using the basename of the sql file they were found in just for coherency, but it doesn't really matter.
This should be behind a (hidden?) flag to dbt compile/run.
We should do the same when generating tests - after we build the string, wrap it in a block, extract that block, and make sure it matches.
Who will this benefit?
This will help us shake out any bugs around block parsing.
The text was updated successfully, but these errors were encountered: