Parent_dag was (is) used for SubDags (which are discouraged). When you Trigger DAG, the best way to make the link is to generate run_id in the way that you can uniquely identify the "triggering" dag. Also in the XCom of the triggering task you will find the "triggered" run_id an execution date (this is used to generate extra-link). I don't think there is any other place where this information is kept.
On Mon, Nov 7, 2022 at 4:48 PM Hervé Ballans <[email protected]> wrote: > > Hi Airflowers, > > I have a Question about the TriggerDagRunOperator in a single > environment Cross-DAG dependencies design: > > I thought that when a DAG was triggered by an another DAG with this > Operator, the triggered DAG had the information that it was triggered by > this another DAG... > But it seems that it does not the case? > > When I go through the GUI, into the "Details" tab of the triggered DAG, > I see nowhere this information? However it exists an attribute > "parent_dag" but with a 'None' value (but maybe it has nothing to do > with...) > > Also, is there a way to retrieve this information from the triggered > DAG? Especially the name of the "parent" DAG that triggered the current DAG? > > Maybe I missed something in the understanding of this operator? > > Thanks, > > Hervé >
