Apache Airflow CLI & DAG Syntax
Production Airflow CLI commands, TaskFlow API decorators, DAG scheduling, testing task instances, and database migrations.
Apache Airflow CLI & DAG Syntax Interactive Command Directory
Browse, search, and copy battle-tested commands & syntax recipes (17 Total Commands).
List all registered DAGs found in the configured Airflow DAGs directory.
Trigger an immediate DAG execution run passing JSON runtime configuration.
Resume or pause automatic scheduling triggers for a specific DAG pipeline.
Execute and debug a specific task instance locally without recording state in the metadata DB.
Run a single task instance directly on current worker node.
Query the execution state (success, failed, running) of a specific DAG run.
Apply database schema migrations to the Airflow metadata store.
Create an external service connection securely in the Airflow metadata store.
Start the Airflow web application UI server daemon in background.
Start the Airflow scheduler monitoring DAG directories and triggering task instances.
Define modern Airflow 2.0+ pipeline using Python decorators with automated XCom passing.
Trigger historic batch DAG backfills across target date window clearing prior execution states.
Clear failed task states matching regex pattern including all downstream dependent tasks.
Define worker slot execution pools to throttle resource-intensive tasks across DAG runs.
Store structured JSON configuration parameters securely in Airflow metadata database.
Inspect currently active task execution backend (CeleryExecutor, KubernetesExecutor, or LocalExecutor).
Implement file sensor in reschedule mode yielding worker slots while awaiting files.
Companion Developer Tools & Playgrounds
Accelerate command execution and syntax debugging with HelloAIHub suite of interactive tools.
In-Browser Code Runner
Test and benchmark syntax scripts in Node.js, Python, TypeScript, and Go with zero local setup.
Regex Live Tester & Explainer
Debug regular expressions, lookarounds, capture groups, and substitution patterns with live AST explanations.
Dockerfile Generator
Generate multi-stage, rootless, production-hardened Dockerfiles with caching and alpine bases.
System Design Sizing Calculator
Compute real-time QPS, storage bandwidth, cache memory ratios, and replica math for distributed architectures.
Apache Airflow CLI & DAG Syntax: Command Groups & Quick Index
17 indexed entries across 17 sectionsHighlighted Flags & Syntax Examples in Apache Airflow CLI & DAG Syntax
List all registered DAGs found in the configured Airflow DAGs directory.
Trigger an immediate DAG execution run passing JSON runtime configuration.
Resume or pause automatic scheduling triggers for a specific DAG pipeline.
Execute and debug a specific task instance locally without recording state in the metadata DB.
Frequently Asked Questions
Expert recommendations, common traps, and production best practices for Apache Airflow CLI & DAG Syntax.
How does the modern TaskFlow API compare to legacy Airflow operators?
Airflow 2.0+ TaskFlow API uses Python decorators (@dag, @task) to define DAGs and tasks natively in pure Python. It automatically manages XCom serialization and data dependencies between tasks, eliminating boilerplate PythonOperator definitions and manual xcom_push / xcom_pull calls.
Why is catchup=False recommended for most production DAGs?
If catchup=True (default), Airflow will execute a DAG run for every missed interval between start_date and the current date when the DAG is unpaused. Setting catchup=False prevents backfill stampedes on newly deployed DAGs.
How does 'airflow tasks test' differ from 'airflow tasks run'?
'airflow tasks test' runs a task locally in an isolated test harness without checking upstream task dependencies or saving execution state to the metadata DB. 'airflow tasks run' executes within the actual Airflow scheduler orchestration framework.
What is the difference between poke mode and reschedule mode in Airflow sensors?
In 'poke' mode (default), the sensor occupies a worker slot and thread continuously until the condition evaluates to true or times out, starving the cluster of worker capacity. In 'reschedule' mode, if the condition is not met, the sensor yields its worker slot back to the pool and sleeps until the next poke_interval, maximizing cluster concurrency.
What is the difference between CeleryExecutor and KubernetesExecutor?
CeleryExecutor uses a static pool of pre-allocated Celery worker nodes consuming tasks from Redis/RabbitMQ, making task startup fast but requiring capacity scaling. KubernetesExecutor dynamically spins up a dedicated Kubernetes pod for each individual task and terminates the pod upon completion, offering perfect isolation and elastic resource scaling at the cost of pod spin-up latency.
How does XCom work in Airflow and what are the size limits?
XCom (Cross-Communication) enables tasks to share small metadata payloads (like file paths or record IDs) via the Airflow metadata database. XCom payloads are serialized in SQL tables: PostgreSQL limits individual XComs to 1GB, MySQL to 64KB, and SQLite to 2GB. Never use XCom to transmit large dataframes; store large datasets in object storage (S3/GCS) and share only URI references via XCom.
Cross-Hub Skill Acceleration
Combine command lookups with active coding interviews and complete career paths.
Need More Cheat Sheets?
Explore developer cheat sheets and syntax guides on HelloAIHub.