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

Can you have a DAG dependent on another DAG? #6

Closed
dirkgently007 opened this issue Jun 5, 2015 · 5 comments
Closed

Can you have a DAG dependent on another DAG? #6

dirkgently007 opened this issue Jun 5, 2015 · 5 comments

Comments

@dirkgently007
Copy link

I see airflow.operators.ExternalTaskSensor supports dependency on an ask in another DAG. But is it possible to set dependency on another DAG itself? In other words, can external_task_id parameter be optional?

@mistercrunch
Copy link
Member

Not for now but it'd be easy to either write an ExternalDagSensor, or add a DummyOperator to the DAG you want to depend on that would be downstream of all the tasks, and use the ExternalTaskSensor against it.

@dirkgently007
Copy link
Author

Thanks @mistercrunch . I think DummyOperator should be an easy solution.

Should I close this?

@mistercrunch
Copy link
Member

Yup, closing.

@jlowin
Copy link
Member

jlowin commented Sep 29, 2015

@mistercrunch sorry to hijack this thread but I've been using the DummyOperator approach for a couple Dags and was considering writing an ExternalDagSensor. Would you accept a PR for one? My thought was it would be identical to ExternalTaskSensor except instead of looking at just one task it would look at every task in the DAG (which it would retrieve from the ORM).

@mistercrunch
Copy link
Member

@jlowin , ExternalDagSensor sounds good, check out the DAG's root property to get all tasks without downstream deps.

I like for everything in a DAG to converge to a last point (an email operator + slack operator that post about completion) but I can understand that not everyone build their DAGs that way.

aoen pushed a commit to aoen/incubator-airflow that referenced this issue Apr 10, 2020
…ob scheduling without explicit_defaults_for_timestamp (apache#6)

* fb64f2e: [TWTR][AIRFLOW-XXX] Twitter Airflow Customizations + Fixup job scheduling without explicit_defaults_for_timestamp

* reformat

* flake8 fix
mobuchowski pushed a commit to mobuchowski/airflow that referenced this issue Jan 4, 2022
mobuchowski pushed a commit to mobuchowski/airflow that referenced this issue Jan 4, 2022
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

3 participants