airflow push to xcom code example
Example 1: xcom airflow
args = {
'owner': '****',
'start_date': airflow.utils.dates.days_ago(2),
'provide_context': True
}
storage_objects = kwargs["ti"].xcom_pull(task_ids="list_files")
Example 2: xcom airflow example
dag_1 = DAG('this_dag_will_be_discovered')
def my_function():
dag_2 = DAG('but_this_dag_will_not')
my_function()