The DAG schedule interval must be defined as one of:
- a cron schedule
- a preset e.g.,
'@once'
, '@hourly'
, etc
None
*
*For the null schedule use case, the DAG won't run automatically and must be triggered somehow.
One way to trigger a DAG is to use SubDAGs via the SubDagOperator
. I think SubDAGs are probably the best option for your use case given that you want the second DAG to be triggered as a result of the first DAG succeeding. There's some nuance to SubDAGs as described in the docs.
The SubDAG will automatically run if the task before it succeeds and skip if the task before it fails/skips assuming you're using ALL_SUCCESS
or ONE_SUCCESS
as your trigger rule.
[This approach is somewhat similar to the TriggerDagRunOperator operator which is another option detailed in @andscoop's answer.]
Another way to trigger a DAG is with an external trigger. This idea is discussed in more detail in this answer.