[Python] Trigger a DAG based on upstream DAG completion (unscheduled)

Discussão em 'Python' iniciado por Stack, Fevereiro 23, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to see if I can trigger a DAG (say B1) to run (daily) if an upstream DAG (say A1) complete's run. I am already aware about ExternalTaskSensor, but my limitation is that upstream DAG U1, is unscheduled i.e. schedule=None and A1 is triggered through a different upstream DAG using TriggerDAGrunOperator.

    I don't own DAG A1 so I can't modify its original code, I have come across DagStateTrigger which is described as follows :


    Waits asynchronously for a different DAG to complete for a specific logical date.
    ​

    what does 'logical date' mean in this context, does anyone have any expereicne of using it?

    I ideally I will schedule my DAG B1 and it will poke the upstream DAG A1 until it completes and run immediatly rightafter.

    Continue reading...

Compartilhe esta Página