Google Cloud

Cloud Composer / Apache Airflow Complete Guide: DAGs, Operators, Workflows Comparison

2026-05-24
NicheeLab Editorial Team

Cloud Composer is GCP's managed Apache Airflow service and the de facto standard for orchestrating data pipelines, ETL, and ML workflows. You define DAGs (Directed Acyclic Graphs) in Python and Composer handles scheduling, dependency resolution, retries, and monitoring automatically.

Composer Version Comparison

ItemComposer 1Composer 2Composer 3 (2024)
FoundationGKE StandardGKE AutopilotServerless
Airflow version1.10 / 2.0 series2.x series2.x series
AutoscalingWorkers onlyFull autoscaling
Workload IdentityYesYes
Support statusEnded in 2024CurrentLatest

DAG Example (BigQuery ETL)

from airflow import DAG
from airflow.providers.google.cloud.operators.bigquery import BigQueryInsertJobOperator
from datetime import datetime, timedelta

default_args = {
    'owner': 'data-team',
    'retries': 2,
    'retry_delay': timedelta(minutes=5),
}

with DAG(
    'daily_user_aggregation',
    default_args=default_args,
    schedule_interval='0 2 * * *',  # 毎日 2:00 JST
    start_date=datetime(2026, 1, 1),
    catchup=False,
) as dag:
    aggregate = BigQueryInsertJobOperator(
        task_id='aggregate_users',
        configuration={
            "query": {
                "query": """
                    INSERT INTO analytics.daily_users
                    SELECT DATE(event_timestamp) AS d, COUNT(DISTINCT user_id) AS dau
                    FROM raw.events
                    WHERE DATE(event_timestamp) = CURRENT_DATE() - 1
                    GROUP BY 1
                """,
                "useLegacySql": False,
            }
        },
    )

Key Operators

  • BigQueryInsertJobOperator / BigQueryToGCSOperator
  • DataflowStartFlexTemplateOperator
  • DataprocSubmitJobOperator
  • GCSToBigQueryOperator
  • PubSubPublishMessageOperator
  • CloudRunExecuteJobOperator (2023 onward)
  • KubernetesPodOperator (runs any Pod)
  • PythonOperator / BashOperator
  • VertexAITrainingOperator / BatchPredictionOperator

Pricing Example (Composer 2, asia-northeast1)

ConfigurationMonthly estimate
Small (1 vCPU / 4 GB)~$360
Medium (2 vCPU / 8 GB)~$600
Large (4 vCPU / 16 GB)~$1000

Composer vs Workflows vs Dataform

ItemComposerWorkflowsDataform
LanguagePython (DAG)YAML / JSONSQLX
PricingPer-environmentPer-step (cheap)BigQuery charges only
Primary use caseComplex data ETL / MLAPI orchestrationBigQuery SQL ELT
Long-running jobsExcellentOK (up to 1 year)Depends on BQ query

Other Airflow / Orchestrator Comparisons

ItemComposerAWS MWAAAstronomerSelf-hosted Airflow
ManagedYesYesYes
GCP integrationExcellentOKOKOK
AutoscalingExcellent (Composer 2/3)OKExcellent
PricingFrom $360/monthFrom $300/monthFrom $500/monthVM hours only

Typical Use Cases

  • Daily batch ETL (Pub/Sub / API → BigQuery)
  • Launching and managing dependencies for Dataflow / Dataproc jobs
  • Vertex AI training and inference pipelines
  • GCS file watching → transformation → BigQuery load
  • Multi-cloud integration (AWS / on-prem DB → BigQuery)
  • SaaS data integration (Salesforce / Marketo → BigQuery)

Best Practices

  • Design DAGs to be idempotent (safely re-runnable)
  • Control parallelism with Pools and Slots
  • Manage Connections and Variables through the Airflow UI or Secret Manager
  • Run Sensors in Reschedule mode to save resources
  • Isolate long-running tasks with KubernetesPodOperator
  • Sync DAG code via Cloud Storage and connect it to Git

What is Cloud Composer used for?

A managed Apache Airflow service. You describe data pipelines, ETL, ML pipelines, and scheduled batches as Python DAGs and orchestrate them on GCP.

What is the difference between Composer 1 and Composer 2?

Composer 2 is built on GKE Autopilot with Airflow 2.x, autoscaling, and Workload Identity. Composer 1 ran on GKE Standard and reached end-of-support in 2024. Composer 3 (2024-) leans serverless.

When should I use Composer vs Workflows?

Composer fits complex DAGs, long-running jobs, Python-centric work, and the broad Operator ecosystem. Workflows is serverless, YAML/JSON-based, and lightweight. Pick Composer for data pipelines and Workflows for API orchestration.

How is Composer priced?

Composer 2 is billed per environment (~$0.5/h, roughly $360/month minimum). Composer 3 is usage-based. The bill aggregates Worker, Web Server, and DB charges.

When should I use Composer vs Dataform?

Composer handles general-purpose pipelines with arbitrary processing. Dataform is a SQL-only workflow tool specifically for BigQuery. Use Dataform for BQ-centric ETL and Composer for everything else.

How does Composer compare to AWS MWAA and Azure Data Factory?

MWAA is also managed Airflow with nearly identical functionality. ADF is GUI-driven and conceptually different from Airflow. Thanks to Airflow compatibility, migrations between MWAA and Composer are straightforward.

What Operators are available?

Google ships official Operators (BigQuery, Dataflow, GCS, Pub/Sub, etc.) on top of 1000+ community Airflow Operators. You can also run any Python code directly.

How do I connect to on-prem databases inside a VPC?

Use Private Composer (VPC-native). On-prem databases can be reached via Cloud VPN or Interconnect.

Related Articles & Data Pipelines

Workflows / Cloud Tasks 完全ガイド|サーバレスオーケストレーション (GCP)

Google Cloud Workflows と Cloud Tasks の全機能解説。YAML ベース DAG、サーバレス、Eventarc 統合、Cloud Composer / Pub/Sub との使い分け、AWS Step Functions / Azure Logic Apps 比較を網羅。

GCP Professional Cloud Developer (PCD) 完全ガイド|Cloud Run・GKE・CI/CD・APM

Google Cloud Professional Cloud Developer の試験範囲、Cloud Run / GKE / Cloud Build / Cloud Trace、AWS DVA / Azure AZ-204 比較、学習ロードマップを徹底解説。

Cloud Storage 完全ガイド|料金・Storage Class・Lifecycle・AWS S3 比較 (GCP)

Google Cloud Storage の全機能解説。Storage Class (Standard/Nearline/Coldline/Archive)、Multi-region、Object Lifecycle、Versioning、Signed URL、Uniform IAM、AWS S3 / Azure Blob 比較を網羅。

App Engine 完全ガイド|Standard vs Flexible・料金・Cloud Run 比較 (GCP)

Google App Engine の Standard と Flexible の違い、料金、Traffic Splitting、Cron、Cloud Run / Cloud Functions との使い分け、AWS Elastic Beanstalk / Azure App Service 比較を徹底解説。

* Google Cloud and Apache Airflow are trademarks of their respective owners. For the latest information, see the official Cloud Composer documentation.

Check what you learned with practice questions

Practice with certification-focused question sets

View GCP Exam Prep
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Google Cloud

Google Cloud Certification Roadmap (2026)

Choose your GCP certification path — Foundational, Associate...

Google Cloud

CDL Cloud Digital Leader: Complete Exam Guide (2026)

Pass the Cloud Digital Leader exam — cloud business value, G...

Google Cloud

GAIL Generative AI Leader: Complete Exam Guide (2026)

Pass the Generative AI Leader exam — Gemini, Vertex AI, Work...

Google Cloud

Vertex AI Fundamentals for GCP Certs (2026)

Vertex AI basics every cert candidate needs — Workbench, Pip...

Google Cloud

Associate Cloud Engineer (ACE): Complete Guide (2026)

Pass the Associate Cloud Engineer exam — Console, gcloud, pr...

Browse all Google Cloud articles (103)
© 2026 NicheeLab All rights reserved.