Skip to content

Instantly share code, notes, and snippets.

@goodbyegangster
Created June 26, 2022 06:13
Show Gist options
  • Save goodbyegangster/33a964ac83dae1ed8836f07af257eb8b to your computer and use it in GitHub Desktop.
Save goodbyegangster/33a964ac83dae1ed8836f07af257eb8b to your computer and use it in GitHub Desktop.
A Sample Trigger Target DAG
from datetime import datetime
from airflow import DAG
from airflow.decorators import task
@task(task_id='pring_message')
def print_message(dag_run=None) -> None:
print(f'received message: {dag_run.conf["message"]}.')
with DAG(
dag_id='trigger_target_dag',
description='A Sample Trigger Target DAG',
schedule_interval=None,
start_date=datetime(2022, 6, 1),
catchup=False,
tags=['example'],
) as dag:
print_message()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment