-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render vars when parsing DbtModel and appending upstream_models #502
Render vars when parsing DbtModel and appending upstream_models #502
Conversation
👷 Deploy Preview for amazing-pothos-a3bca0 processing.
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #502 +/- ##
==========================================
- Coverage 91.82% 91.78% -0.05%
==========================================
Files 49 49
Lines 1896 1911 +15
==========================================
+ Hits 1741 1754 +13
- Misses 155 157 +2
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dojinkimm , this is looking great. Thanks for the fix and the test! Once the tests pass after the rebase, I'll merge this change. We'll release it as part of the 1.1.1 release.
Out of curiosity, why are you using load_method=LoadMode.CUSTOM
?
@tatiana I am currently using astronomer-cosmos 0.6.8 due to some package conflicts in my environment, and load_method does not exist in that version. So, I was using default parsing logic |
Hi @dojinkimm , I see - is there any chance we could help you with the dependency conflict? Please feel free to log a ticket. |
Bug fixes * Fix attempt of emitting OpenLineage events if task execution fails by @tatiana in #526 * Fix Rust dependency for Windows users by @tatiana in #526 * Fix DbtRunOperationLocalOperator missing flags by @tatiana in #529 * Fix DbtRunLocalOperator to support the full refresh argument by @tatiana in #529 * Remove redundant prefix of task names when test_behavior = TestBehavior.AFTER_EACH by @binhnq94 in #524 * Fix rendering vars in `DbtModel` when using `LoadMode.CUSTOM` by @dojinkimm in #502 Others * Docs: add `documentation comparing Airflow and dbt concepts <https://astronomer.github.io/astronomer-cosmos/getting_started/dbt-airflow-concepts.html>`_ by @tatiana in #523. * Update PyPI project links by @tatiana in #528 * pre-commit updates
Bug fixes * Fix attempt of emitting OpenLineage events if task execution fails by @tatiana in #526 * Fix Rust dependency for Windows users by @tatiana in #526 * Fix DbtRunOperationLocalOperator missing flags by @tatiana in #529 * Fix DbtRunLocalOperator to support the full refresh argument by @tatiana in #529 * Remove redundant prefix of task names when test_behavior = TestBehavior.AFTER_EACH by @binhnq94 in #524 * Fix rendering vars in `DbtModel` when using `LoadMode.CUSTOM` by @dojinkimm in #502 Others * Docs: add `documentation comparing Airflow and dbt concepts <https://astronomer.github.io/astronomer-cosmos/getting_started/dbt-airflow-concepts.html>`_ by @tatiana in #523. * Update PyPI project links by @tatiana in #528 * pre-commit updates
Bug fixes * Remove redundant prefix of task names when test_behavior = TestBehavior.AFTER_EACH by @binhnq94 in #524 * Fix rendering vars in `DbtModel` when using `LoadMode.CUSTOM` by @dojinkimm in #502 * Fix attempt of emitting OpenLineage events if task execution fails by @tatiana in #526 * Fix Rust dependency for Windows users by @tatiana in #526 * Fix DbtRunOperationLocalOperator missing flags by @tatiana in #529 * Fix DbtRunLocalOperator to support the full refresh argument by @tatiana in #529 Others * Docs: add `documentation comparing Airflow and dbt concepts <https://astronomer.github.io/astronomer-cosmos/getting_started/dbt-airflow-concepts.html>`_ by @tatiana in #523. * Update PyPI project links by @tatiana in #528 * pre-commit updates
Description
When parsing DbtModel if I have vars in sql file, I fail to get valid upstream models (vars were not rendered as expected). This is because when add a model to upstream_models only
Const
types are allowed andConcat
types are skipped.I passed operator_args and used
vars
from operator_args when adding upstream_models. if variable exist but it is not defined invars
it raises KeyError and skips as before. If correct value exist forvars
it the value is added up to upstream_modelRelated Issue(s)
closes #495
Breaking Change?
Checklist