Skip to content

Instantly share code, notes, and snippets.

@cra
Created July 13, 2022 09:37
Show Gist options
  • Select an option

  • Save cra/035873804ad481322c7e537eb9ef89c0 to your computer and use it in GitHub Desktop.

Select an option

Save cra/035873804ad481322c7e537eb9ef89c0 to your computer and use it in GitHub Desktop.
import pendulum
from airflow import DAG
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
dag = DAG(
dag_id='i_will_trigger',
schedule_interval=None,
start_date=pendulum.parse('2022-07-13'),
)
task = TriggerDagRunOperator(
task_id='run_me',
trigger_dag_id='triggable',
conf={'hello': 'goodbye'},
dag=dag,
)
import pendulum
from airflow import DAG
from airflow.operators.bash import BashOperator
dag = DAG(
dag_id='triggable',
params={'hello': 'there'},
schedule_interval=None,
start_date=pendulum.parse('2022-07-13')
)
task = BashOperator(task_id='aaa', dag=dag, bash_command='echo {{ params.hello }}')
@cra
Copy link
Copy Markdown
Author

cra commented Jul 13, 2022

log excerpt
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment