Airflow CLI
Overview
This section includes reference documentation for the Airflow shell CLI.
The usage is as follows:
$ airflow COMMAND [GENERIC_OPTIONS] SUBCOMMAND [COMMAND_OPTIONS]
Miscellaneous commands
General-purpose Airflow commands.
| Command | Description |
|---|---|
Displays cheat sheet |
|
Starts a standalone DAG Processor instance |
|
Shows information about the current Airflow and environment |
|
Starts a Kerberos ticket renewer |
|
Dumps information about the loaded plugins |
|
Rotates encrypted connection credentials and variables |
|
Starts a scheduler instance |
|
Runs an all-in-one copy of Airflow |
|
Upgrades permissions for existing roles and optionally DAGs |
|
Starts a triggerer instance |
|
Shows the Airflow version |
|
Starts an Airflow webserver instance |
Manage DAGs
The commands for managing DAGs.
| Command | Description |
|---|---|
Runs subsections of a DAG for a specified date range |
|
Deletes all DB records related to the specified DAG |
|
Displays information about a DAG |
|
Lists all DAGs |
|
Lists all DAGs that have import errors |
|
Lists jobs |
|
Lists DAG runs |
|
Displays the next DAG execution dates |
|
Pauses a DAG |
|
Shows DAG loading report |
|
Re-serializes all DAGs by parsing the DAG files |
|
Displays DAG tasks with their dependencies |
|
Displays DAGs with their dependencies |
|
Displays the status of a DAG run |
|
Executes a single DAG run |
|
Triggers a DAG run |
|
Resumes a paused DAG |
Database operations
The commands for managing the Airflow database.
| Command | Description |
|---|---|
Checks if the database can be reached |
|
Checks if a migration has finished |
|
Purges old records in the metastore tables |
|
Downgrades the schema of the metadata database |
|
Drops archived tables created through the |
|
Exports archived data from the archive tables |
|
Initializes the metadata database |
|
Drops and rebuilds the metadata database |
|
Runs a shell to access the database |
|
Upgrades the metadata database to latest version |
Manage jobs
The commands for managing Airflow jobs.
| Command | Description |
|---|---|
Checks if a job is still alive |
KubernetesExecutor tools
The commands for managing KubernetesExecutor.
| Command | Description |
|---|---|
Cleans up Kubernetes pods (created by KubernetesExecutor/KubernetesPodOperator) in |
|
Generates YAML files for all tasks in a DAG. Useful for debugging tasks without launching them in a cluster |
Display providers
The commands for displaying information about providers.
| Command | Description |
|---|---|
Displays information about API auth backends |
|
Displays information about registered connection types with custom behaviour |
|
Displays detailed information about a provider |
|
Lists registered provider hooks |
|
Lists extra links registered by the providers |
|
Lists installed providers |
|
Displays information about task logging handlers |
|
Displays information about secret managing backends |
|
Displays information about registered widgets connections |
Manage roles
The commands for managing Airflow roles.
| Command | Description |
|---|---|
Adds permissions to a role |
|
Creates a role |
|
Deletes role permissions |
|
Deletes a role |
|
Exports roles (without permissions) from the database to a JSON file |
|
Imports roles (without permissions) from a JSON file to the database |
|
Lists roles |
Manage tasks
The commands for managing Airflow tasks.
| Command | Description |
|---|---|
Clears a set of task instances |
|
Returns the unmet dependencies for a task instance |
|
Displays the tasks within a DAG |
|
Displays a task instance templates |
|
Runs a single task instance |
|
Displays the status of a task instance |
|
Displays the status of all task instances in a DAG run |
|
Tests a task instance |