A code snippet showing how to trigger a DAG in Cloud Composer (managed Airflow) using the gcloud command line tool.

PROJECT="gcp-project-name"
LOCATION="us-central1"
ENVIRONMENT="composer-environment-name"
gcloud composer environments run $ENVIRONMENT \
--location $LOCATION \
--project $PROJECT \
dags trigger -- dag_name \
# if passing in custom json data to dag
#--conf '{"process_date": "2025-04-24"}'