Skip to content
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

Closes #10 Adding vars as a template_field to DbtBaseOperator #41

Merged
merged 1 commit into from Feb 9, 2022

Conversation

marcusintrohive
Copy link
Contributor

Adding vars to the list of template_fields on the DbtBaseOperator.

This will allow passing variables to the operator from the dag_run.conf

@marcusintrohive marcusintrohive changed the title Adding vars as a template_field to DbtBaseOperator Adding vars as a template_field to DbtBaseOperator Closes #10 Feb 8, 2022
@marcusintrohive marcusintrohive changed the title Adding vars as a template_field to DbtBaseOperator Closes #10 Closes #10 Adding vars as a template_field to DbtBaseOperator Feb 8, 2022
@codecov
Copy link

codecov bot commented Feb 9, 2022

Codecov Report

Merging #41 (d6b8e9e) into master (fc0a12f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #41   +/-   ##
=======================================
  Coverage   97.34%   97.34%           
=======================================
  Files           5        5           
  Lines         677      677           
=======================================
  Hits          659      659           
  Misses         18       18           
Flag Coverage Δ
unittests 97.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
airflow_dbt_python/operators/dbt.py 99.32% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc0a12f...d6b8e9e. Read the comment docs.

@tomasfarias
Copy link
Owner

Looks good to me, let's wait and see what the tests say before merging. I'll probably push this out in version 0.12, and leave the custom backend code for 0.13 (as that is a much bigger and riskier change).

Important to note that this probably doesn't work with Airflow 1.x or 2.0 as support for Jinja's NativeEnvironmentwas added in 2.1, and we expect vars to already be a dict. Eventually, we can work that in a different issue.

@tomasfarias tomasfarias merged commit 9cc65d5 into tomasfarias:master Feb 9, 2022
@marcusintrohive
Copy link
Contributor Author

Thanks @tomasfarias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants