Apache Airflow Standard Providers

raw JSON →
1.12.2 verified Fri Apr 24 auth: no python

This package provides "standard" operators, hooks, and sensors for Apache Airflow. It extends the core Airflow functionality with common components that were historically part of the main `apache-airflow` package before the modularization introduced in Airflow 2.0. The current version is 1.12.2, and providers are released and versioned independently from Airflow core following a Semver scheme, often with more frequent releases than Airflow itself.

pip install apache-airflow-providers-standard
error ModuleNotFoundError: No module named 'airflow.providers'
cause This error occurs when the 'airflow.providers' module is not found, often due to missing or incompatible provider packages.
fix
Ensure that the required provider packages are installed and compatible with your Airflow version. For example, install the standard provider package using 'pip install apache-airflow-providers-standard'.
error ImportError: cannot import name 'BaseOperator' from 'airflow.models'
cause This error occurs when attempting to import 'BaseOperator' directly from 'airflow.models', which is not supported in newer versions of Airflow.
fix
Import 'BaseOperator' from 'airflow.operators.base' instead: 'from airflow.operators.base import BaseOperator'.
error RuntimeError: The package `apache-airflow-providers-standard:1.12.1` needs Apache Airflow 2.11.0+
cause This error occurs when the installed version of the 'apache-airflow-providers-standard' package requires a newer version of Apache Airflow than is currently installed.
fix
Upgrade Apache Airflow to version 2.11.0 or higher to be compatible with the installed provider package.
error AttributeError: module 'airflow.providers.standard' has no attribute 'exceptions'
cause This error occurs when attempting to access the 'exceptions' module within 'airflow.providers.standard', which may not exist or be improperly referenced.
fix
Ensure that you are importing the correct module and that the 'exceptions' module exists within 'airflow.providers.standard'. Verify the module's availability in the provider's documentation.
error ImportError: cannot import name 'ExternalTaskSensor' from 'airflow.sensors.external_task'
cause This error occurs when the 'ExternalTaskSensor' class is not found in the 'airflow.sensors.external_task' module, possibly due to changes in module structure.
fix
Import 'ExternalTaskSensor' from 'airflow.providers.standard.sensors.external_task' instead: 'from airflow.providers.standard.sensors.external_task import ExternalTaskSensor'.
breaking When upgrading to Airflow 3.x, many core operators and hooks (e.g., `PythonOperator`, `BaseHook`) were moved from `airflow.operators` or `airflow.sensors` directly into specific provider packages, including `apache-airflow-providers-standard`. This requires updating import paths in existing DAGs.
fix Update import statements to use the `airflow.providers.standard` path, e.g., `from airflow.providers.standard.operators.python import PythonOperator`.
breaking Support for Python 3.9 was dropped in `apache-airflow-providers-standard` version 1.4.0. Users on Python 3.9 must upgrade their Python environment to `3.10` or newer to use current provider versions.
fix Upgrade Python environment to 3.10, 3.11, 3.12, 3.13, or 3.14.
deprecated In Airflow 3.x, custom operators cannot access the Airflow metadata database directly using database sessions. This change improves security and maintainability.
fix Use the Airflow Python Client for programmatic interaction with Airflow resources or utilize `DbApiHook` (e.g., `PostgresHook`, `MySqlHook`) if direct database interaction is essential for external systems.
gotcha The minimum Apache Airflow version supported by this provider is 2.11.0. Installing this provider on older Airflow versions may lead to compatibility issues or automatic, potentially breaking, upgrades of the `apache-airflow` package.
fix Ensure your Apache Airflow core installation is version 2.11.0 or newer before installing this provider package.
runtime status import time mem disk
3.10-alpine 4.79s 65.3MB 242.8M
3.10-slim 3.40s 65.3MB 241M
3.11-alpine 6.59s 70.7MB 262.6M
3.11-slim 5.18s 70.7MB 261M
3.12-alpine 5.72s 69.5MB 252.8M
3.12-slim 5.84s 69.5MB 252M
3.13-alpine 5.41s 70.1MB 254.5M
3.13-slim 5.53s 70.1MB 254M
3.9-alpine 6.61s 77.1MB 209.6M
3.9-slim 5.83s 77.1MB 205M

This example demonstrates a basic Airflow DAG using the `PythonOperator` provided by the `apache-airflow-providers-standard` package. Ensure you have Apache Airflow installed (`apache-airflow>=2.11.0`) and then install this provider package. The `PythonOperator` allows you to execute an arbitrary Python callable as an Airflow task.

from __future__ import annotations

import pendulum

from airflow.models.dag import DAG
from airflow.providers.standard.operators.python import PythonOperator

def _print_hello():
    print("Hello from Apache Airflow Standard Providers!")

with DAG(
    dag_id="standard_provider_quickstart",
    start_date=pendulum.datetime(2023, 1, 1, tz="UTC"),
    schedule=None,
    catchup=False,
    tags=["example", "standard", "provider"],
) as dag:
    greet_task = PythonOperator(
        task_id="greet_with_standard_python_operator",
        python_callable=_print_hello,
    )