Skip to main content

Orchestration-pipelines

PyPI version Python Versions Support Status License

A library for defining and generating Apache Airflow DAGs declaratively using YAML. Currently focused on orchestration of GCP resources (Dataproc, BigQuery, Dataform) and DBT...

[!NOTE] This library is currently in Preview.

Overview

orchestration-pipelines allows you to define complex data workflows in simple, human-readable YAML files. It abstracts away the boilerplate of writing Airflow DAGs in Python, making it easier for non-Python experts to create and manage pipelines.

Supported Python Versions

Python >= 3.9

Features

  • Declarative DAGs: Define your pipeline structure, triggers, and actions in YAML.
  • Rich Actions Support: Built-in support for:
    • Python Scripts
    • Google Cloud BigQuery
    • Google Cloud Dataproc (Serverless, Ephemeral and existing clusters)
    • Google Cloud Dataform
    • DBT
  • Automatic Generation: A simple Python call generates the full Airflow DAG.
  • Versioning: Supports versioning of pipelines via a manifest file(as of Preview, on Google Cloud Composer).

Installation

You can install orchestration-pipelines from PyPI:

pip install orchestration-pipelines

[!IMPORTANT] Ensure your apache-airflow-client version is fully compatible with Airflow 3 to prevent critical DAG parsing or runtime errors. This package utilizes Airflow Client API calls to interact with the metadata database; apache-airflow-client library introduces significant architectural shifts in newer versions, a version mismatch will likely break communication and disrupt your pipelines. Always verify that your client version aligns with your Airflow environment to ensure stability.

Quick Start

1. Define your pipeline in YAML

Create a file named my_pipeline.yml:

modelVersion: "1.0"
pipelineId: "my_pipeline"
description: "A simple example pipeline"
runner: "airflow"

defaults:
  projectId: "your-gcp-project"
  location: "us-central1"

triggers:
  - schedule:
      interval: "0 4 * * *"
      startTime: "2026-01-01T00:00:00"
      catchup: false

actions:
  - sql:
      name: "create_table"
      query:
        inline: "CREATE TABLE IF NOT EXISTS `your-gcp-project.my_dataset.my_table` (id INT64, name STRING);"
      engine:
        bigquery:
          location: "US"

Known Limitations

Parameters provided to actions (e.g., in SQL queries, scripts) are always passed as strings. Users must handle type casting within their scripts, queries, or notebooks if different data types are required (e.g., using CAST in SQL).

Avoid using n or y (as well as yes, no, on, or off) as unquoted keys in your YAML definitions. Due to YAML 1.1 parsing specifications, these unquoted words are implicitly evaluated as boolean false/true rather than strings. If you must use them as strings, they must be wrapped in explicit quotes (e.g. 'n' or "y").

2. Generate the Airflow DAG

Create a Python file named my_pipeline.py in your Airflow DAGs folder:

from orchestration_pipelines_lib.api import generate

# Generate Airflow DAG from pipeline definition file
# airflow | dag
# Root is "dags" directory in Composer bucket
generate("dataform-pipeline-local.yml")

Airflow will parse this Python file and automatically generate the DAG based on your YAML definition.

Advanced Features

Versioning and Manifests

You can manage multiple versions of your pipelines using a manifest.yml file. This allows you to specify which version of a pipeline should be active.

See the examples/ directory for a sample manifest.yml and how to use it.

Contributing

Contributions are welcome! Please see contributing.md for guidelines.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orchestration_pipelines-0.4.0.tar.gz (66.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orchestration_pipelines-0.4.0-py3-none-any.whl (100.7 kB view details)

Uploaded Python 3

File details

Details for the file orchestration_pipelines-0.4.0.tar.gz.

File metadata

  • Download URL: orchestration_pipelines-0.4.0.tar.gz
  • Upload date:
  • Size: 66.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for orchestration_pipelines-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ec97ef9a4d32940b80b112a6e16e2c39aca7968bcdd8a3b65b59078867b93bdd
MD5 e4b7354a43ccb7c178d424b7e29ca069
BLAKE2b-256 018f0f4cef644eea3324b21d6bb86ef3d0b2f9fac97c202884df3b6a424379a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for orchestration_pipelines-0.4.0.tar.gz:

Publisher: orchestration-pipelines-py@oss-exit-gate-prod.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: orchestration-pipelines-py@oss-exit-gate-prod.iam.gserviceaccount.com

File details

Details for the file orchestration_pipelines-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for orchestration_pipelines-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5bc4fd26a0bad47c0715ede7878ed2624e830d4f31e4b1783a773196178257a
MD5 4a63ce8e47ca5d4fc5d1a2e59684c686
BLAKE2b-256 54b15f477df1ff7509dc663f7f2ec50c802967d38aa3feff210ad75a6524b10d

See more details on using hashes here.

Provenance

The following attestation bundles were made for orchestration_pipelines-0.4.0-py3-none-any.whl:

Publisher: orchestration-pipelines-py@oss-exit-gate-prod.iam.gserviceaccount.com

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.
  • Statement: Publication detail:
    • Token Issuer: https://accounts.google.com
    • Service Account: orchestration-pipelines-py@oss-exit-gate-prod.iam.gserviceaccount.com

Release history Release notifications | RSS feed

1.1.0

2 files

1.0.0

2 files

0.4.1

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page