Cloud Composer は GCP 上で Apache Airflow をマネージド実行するサービスで、データパイプライン・ETL・ML オーケストレーションの標準ツールです。 Python で DAG (Directed Acyclic Graph) を定義し、定期実行・依存関係解決・リトライ・モニタリングを自動化できます。
| 項目 | Composer 1 | Composer 2 | Composer 3 (2024) |
|---|---|---|---|
| 基盤 | GKE Standard | GKE Autopilot | Serverless |
| Airflow バージョン | 1.10 / 2.0 系 | 2.x 系 | 2.x 系 |
| Autoscaling | — | Worker のみ | フル Autoscaling |
| Workload Identity | — | ◎ | ◎ |
| サポート | 2024 終了 | 現行 | 最新 |
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,
}
},
)| 構成 | 月額目安 |
|---|---|
| Small (1 vCPU / 4 GB) | ~$360 |
| Medium (2 vCPU / 8 GB) | ~$600 |
| Large (4 vCPU / 16 GB) | ~$1000 |
| 項目 | Composer | Workflows | Dataform |
|---|---|---|---|
| 言語 | Python (DAG) | YAML / JSON | SQLX |
| 料金 | Environment 課金 | Step 課金 (安) | BQ 料金のみ |
| 主用途 | 複雑データ ETL / ML | API オーケストレーション | BQ SQL ELT |
| 長時間ジョブ | ◎ | ○ (1 年) | BQ クエリ次第 |
| 項目 | Composer | AWS MWAA | Astronomer | Self-hosted Airflow |
|---|---|---|---|---|
| マネージド | ◎ | ◎ | ◎ | — |
| GCP 統合 | ◎ | ○ | ○ | ○ |
| Autoscaling | ◎ (Composer 2/3) | ○ | ◎ | — |
| 料金 | $360〜/月 | $300〜/月 | $500〜/月 | VM 時間のみ |
Cloud Composer は何のためのサービス?
Apache Airflow のマネージドサービス。データパイプライン、ETL、ML パイプライン、定期バッチを Python DAG で記述してオーケストレーション。
Composer 1 と Composer 2 の違いは?
Composer 2 は GKE Autopilot ベース、Airflow 2 系、Autoscaling、Workload Identity。Composer 1 は GKE Standard で 2024 サポート終了。Composer 3 (2024-) は Serverless 寄り。
Workflows との使い分けは?
Composer = 複雑な DAG、長時間ジョブ、Python 中心、大量の Operators。Workflows = サーバレス、YAML/JSON、軽量。データパイプラインは Composer、API オーケストレーションは Workflows。
料金体系は?
Composer 2 = Environment 単位 (~$0.5/h、月 $360 最低)、Composer 3 = 使用量ベース。Worker / Web Server / DB の総額で算出。
Dataform との使い分けは?
Composer = 汎用パイプライン (任意の処理)、Dataform = BigQuery 専用 SQL ワークフロー。BQ 中心 ETL は Dataform、それ以外は Composer。
AWS MWAA / Azure Data Factory との比較は?
MWAA も Airflow マネージド (機能ほぼ同等)、ADF は GUI ベースで Airflow と思想異なる。Airflow 互換性で MWAA と Composer は移行容易。
Operator 一覧は?
Google 公式 Operator (BigQuery / Dataflow / GCS / Pub/Sub 等) + OSS Airflow Operator 1000+。任意の Python コードも実行可能。
VPC 内のオンプレ DB 接続は?
Private Composer (VPC ネイティブ) で実現。Cloud VPN / Interconnect 経由でオンプレ DB アクセス可能。
関連記事・データパイプライン
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、Apache Airflow は各々の商標保有者の所有物です。最新情報は Cloud Composer 公式 をご確認ください。
NicheeLab編集部
データエンジニアリング・クラウド資格の専門家。Databricks・Snowflake等の認定資格を保有し、実務経験に基づいた問題作成・解説を行っています。NicheeLab運営。
Google Cloud (GCP) 認定資格ロードマップ 2026 完全版|全 15 試験を体系化
Google Cloud 認定資格 全 15 試験 (Foundational 2 + Associate 3 + Pr...
Cloud Digital Leader (CDL) 完全ガイド|出題範囲・学習リソース・合格戦略
Google Cloud Cloud Digital Leader (CDL) の完全ガイド。6 ドメイン 92 bul...
Generative AI Leader (GAIL) 完全ガイド|Google Cloud 生成 AI 認定
Google Cloud Generative AI Leader (GAIL、2025-05-14 リリース) の完全...
Vertex AI 入門|Google Cloud 統合 ML プラットフォームの全機能
Google Cloud Vertex AI の入門解説。Vertex AI Studio / Agent Builde...
GCP Associate Cloud Engineer (ACE) 完全ガイド|試験範囲・受験料・学習ロードマップ
Google Cloud Associate Cloud Engineer (ACE) の試験範囲・受験料 125 US...