An Apache Airflow provider for running PySpark or Scala/Spark jobs on AWS Glue, Databricks, or Wherobots Cloud from a single DAG-level API.
Write a DAG once and target any supported engine by switching one argument. Cluster shape, Iceberg catalog wiring, JAR and wheel distribution, and per-platform cluster init are handled by the provider.
- Single entry point:
spark_agnostic_task_groupruns the same job on any supported engine; onlyspark_impl_nameand the platform config change. - Typed configuration: no org-specific defaults; every environment value is passed in.
- Classified failures with safe retries and console links.
- Local rendering of submission payloads, plus a Bundle Inspector Airflow UI plugin.
- Install
- Quick start
- Operator links
- Failure messages
- Wherobots runtime selection
- Databricks runner deployment
- Local rendering
- Bundle Inspector plugin
- Reference
- Development
pip install airflow-provider-overtureOptional extras for platforms that need additional SDKs:
pip install "airflow-provider-overture[databricks]"
pip install "airflow-provider-overture[wherobots]"
pip install "airflow-provider-overture[all]"Requires Python >=3.11 and Apache Airflow >=3.3.
from datetime import datetime
from airflow import DAG
from overture_airflow_provider import (
ArtifactStoreConfig,
AwsGlueClusterSize,
GlueConfig,
IcebergConfig,
PackageRegistryConfig,
spark_agnostic_task_group,
)
with DAG(
dag_id="example_spark_agnostic",
start_date=datetime(2025, 1, 1),
schedule=None,
catchup=False,
) as dag:
spark_agnostic_task_group(
group_id="my_spark_job",
spark_impl_name="GLUE_v5",
sedona_version="1.7.0",
module_name="my_pkg.jobs",
class_name="MyJob",
python_packages="my-pkg==1.0.0",
parameters={"s3_input": "s3://example-bucket/in/", "s3_output": "s3://example-bucket/out/"},
spark_cluster_size=AwsGlueClusterSize.G_2X.name,
artifact_store=ArtifactStoreConfig(
s3_bucket="example-bucket",
s3_root="spark-agnostic-operator",
),
package_registry=PackageRegistryConfig(
domain="my-domain",
domain_owner="123456789012",
repository="my-pypi",
region="us-east-1",
),
glue_config=GlueConfig(iam_role_name="AWSGlueServiceRole"),
iceberg_config=IcebergConfig(spark_config="{}"),
)Switching to Databricks or Wherobots requires only a different spark_impl_name and the matching config dataclass. The surrounding DAG code does not change.
See examples/example_dag.py for a runnable DAG targeting all three platforms.
See SPEC.md for the full architecture.
The execute_spark_job task gets a "Spark Job" console link automatically, plus an opt-in, pluggable "Report Issue" link. See docs/operator-links.md.
Failures are classified (downstream-job, submit/config, trigger/polling, platform/infra, platform/capacity) with a reason, root-cause tail, hint, and console link. Submit and capacity faults are retryable via retries=; jobs that ran and failed never are. See docs/failure-messages.md.
Set spark_cluster_size_name (for example "large-himem") to pick a specific Wherobots runtime; Glue and Databricks ignore it. See docs/wherobots-runtime-selection.md.
setup_cluster stages the runner notebook and init script into the workspace by default; stage_workspace_assets=False keeps deployment manual. See docs/databricks-runner-deployment.md.
python -m overture_airflow_provider.render produces the platform submission payload without running Airflow. See docs/local-rendering.md.
Installing the package also registers an Airflow UI plugin for browsing Overture bundles in S3. See docs/bundle-inspector.md.
Supported versions, the Spark platform matrix (GLUE_v4/GLUE_v5, DATABRICKS_v14/DATABRICKS_v15, WHEROBOTS_v1_5_0) and tested Apache Sedona pairings are in docs/reference.md.
uv sync --all-extras --group dev
uv run pytest -v
uv run ruff check .
uv run ruff format --check .Requires Airflow 3.x. _airflow_compat.py is the single import point for the airflow.sdk symbols the provider uses.
Windows: Apache Airflow does not officially support Windows (a warning is emitted at import time). Tests, lint, and the render module all work, but production deployments should run on Linux or macOS.
See CONTRIBUTING.md.