-
Notifications
You must be signed in to change notification settings - Fork 61
Add the functionality to parse env parameter to the airflow worker #60
Conversation
This PR should solve the Issue #36 |
Hey @RafalSiwek, I loved that, this will really help me. |
Hey @mariotaddeucci, thank you for the suggestion, I've added the |
@RafalSiwek , nice indeed |
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.
Includes the feature itself, testing and documentation (both in the README and in the python code). This LGTM 👍
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.
Sorry for the delay, this looks great! Thanks also for adding docs.
I'll create a new release
@andrewrjones is there an ETA for the release with this PR included? |
@cvlendistry , it should be supported now since it was merged with the main branch |
Hello, Unfortunately, I am getting airflow-dbt==0.4.0 Have someone encountered same behaviour once? Not sure if this a good place for discussing this, let me know if this more appropriate places to talk about it. Thank you in advance! |
Hi! Do you have an ETA for when the |
I am running into this exact same issue right now - is there a known workaround? |
Hi, this issue appears to be still related to not updated PyPi |
Would be curious to see if anyone has an example of this - I can save the files and import them as local dependencies, but then I get this error:
|
Latest airflow-dbt official release dates back to September 2021 so indeed the env parameter proposed in this PR is not included yet. Anyone have a workaround that still relies on dbtrunoperator and env vars? Or an ETA for this PR? |
@andrewrjones Can you release this to pip please? |
To inject the custom operator into the Airflow setup I used the tips on https://docs.astronomer.io/learn/airflow-importing-custom-hooks-operators The dbt_run = DbtRunOperator(
task_id='dbt_run',
env=env_dict,
dbt_bin='/usr/local/airflow/.local/bin/dbt',
profiles_dir=RESOURCES_PATH,
dir=RESOURCES_PATH
) |
Hi - Also running into this issue Any idea when this is going to be released and the airflow-dot package updated for pip ? Seems like this would solve a bunch of issues for lot of people Cheers |
When working with DBT projects, a need arises to be able to pass environment variables to the worker context on which the given operator is executed.
This pull request introduces a solution, similar to the BashOperator, with an additional kwarg parameter, called
env
which allows parsing env variables to the context using existing operators: