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

BashOperator should inject env var to signal caller #19

Open
pandemicsyn opened this issue Jun 8, 2022 · 0 comments
Open

BashOperator should inject env var to signal caller #19

pandemicsyn opened this issue Jun 8, 2022 · 0 comments

Comments

@pandemicsyn
Copy link

Per https://github.com/meltano/internal-general/issues/391 we need a way to determine whether the meltano run $tasks are originating from Airflow. To do so we can inject an env var and use a BashOperator call like:

BashOperator(
    task_id=task_id,
    bash_command=f"cd {PROJECT_ROOT}; {MELTANO_BIN} run {run_args}",
    dag=dag,
    env={"MELTANO_CALLER": "airflow"}
)
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

No branches or pull requests

1 participant