3: Data Pipeline Orchestration

    Select a data transformation tool (e.g., Dataproc, Dataflow, Cloud Data Fusion, Cloud Composer, Dataform) based on business requirements

    Key points

    A transformation tool turns raw, ingested data into a shape that downstream consumers can query. The choice rarely hinges on raw capability, because most of the listed services can technically read a CSV file and write a fact table. The decision hinges on three axes:

    • the skill set of the team that will own the pipeline,
    • the latency profile of the workload (batch, micro-batch, or streaming),
    • the existing investment in code or libraries.

    A SQL team that already publishes models in a Git repository wants Dataform. A Spark team migrating off an on-premises cluster wants Dataproc. A team with no existing code base and a hard streaming requirement wants Dataflow. A team of analysts that prefers drag-and-drop wants Cloud Data Fusion. A team that needs to call a dozen heterogeneous services in a single workflow wants Cloud Composer.

    Dataform is the SQL-native transformation engine inside BigQuery. It executes SQLX files (SQL with a small directive layer for configuration, dependencies, and assertions) and produces tables, incremental tables, views, and materialized views in BigQuery. Compilation resolves a directed acyclic graph of object dependencies, and execution submits each node as a BigQuery job. The compute is BigQuery slot capacity, so cost follows the on-demand or edition slot model from Chapter 1. Dataform itself is free of charge for the orchestration layer; only the underlying BigQuery jobs incur cost. Dataform fits any team whose transformation logic is already SQL or can be expressed in SQL, and whose target store is BigQuery.

    Dataflow runs Apache Beam pipelines on a managed worker pool.

    Beam offers the same programming model for batch and streaming, so a single pipeline can switch modes by changing the runner configuration and the source.

    Dataflow autoscales the worker pool, recovers from worker failures, and supports Dataflow Shuffle and Streaming Engine for stateful operations. The cost model is:

    • per vCPU hour
    • per GB hour of memory
    • per GB of persistent disk hour
    • per GB of Streaming Engine data processed (when the option is enabled)

    Dataflow fits teams:

    • with code-first transformation logic that crosses batch and streaming
    • that need exactly-once processing
    • or that consume from Pub/Sub at high throughput

    Dataproc is the managed Hadoop and Spark service.

    It provisions ephemeral or long-running clusters, supports Spark, PySpark, Spark SQL, Hive, Pig, Presto, Trino, and Flink, and runs jobs through the Jobs API, the Dataproc Workflow Templates API, or directly on the cluster.

    Dataproc Serverless for Spark removes the cluster lifecycle: the user submits a batch and the platform provisions the resources. Dataproc fits teams:

    • with existing Spark or Hadoop code
    • with libraries that target the JVM ecosystem
    • or with regulatory constraints that mandate open-source engines

    Comparison

    Cloud Data Fusion is the visual, code-free transformation service built on the open-source CDAP project.

    Pipelines are drawn as graphs of plugins (sources, transforms, sinks, error collectors) in a browser canvas.

    At runtime, Cloud Data Fusion compiles the graph into a Dataproc job and submits it. Three editions exist:

    • Developer (single instance for development, lower availability)
    • Basic (production with batch)
    • Enterprise (production with streaming, replication, and more plugins)

    Cost combines a per-hour instance fee with the underlying Dataproc execution cost. Cloud Data Fusion fits teams:

    • of analysts who prefer a visual builder
    • who need a wide catalog of connectors to non-Google systems
    • or who must move quickly without writing Java or Python

    Cloud Composer is the managed Apache Airflow service. It is the orchestrator, not the transformation engine itself.

    A Composer environment hosts an Airflow web server, scheduler, worker pool, and database, and runs Python DAG files from a Cloud Storage bucket. Operators submit work to BigQuery, Dataflow, Dataproc, Cloud Data Fusion, Dataform, Cloud Functions, Cloud Run, and external systems.

    Cost combines an environment fee (small, medium, or large) with the underlying GKE node, Cloud SQL, and Cloud Storage charges. Cloud Composer fits teams that orchestrate across many services, that need explicit retry and SLA policies, or that already use Airflow in another environment.

    Decision Tree: Choosing the Transformation Tool

    Examples

    A representative business mapping makes the trade-offs concrete.

    • A retail analytics group consolidating daily orders into a sales fact table picks Dataform, because the work is a chain of MERGE statements and the team writes SQL.
    • A fraud-detection team scoring credit-card transactions in real time picks Dataflow, because the source is Pub/Sub at hundreds of thousands of messages per second and exactly-once delivery matters.
    • A media company migrating an on-premises Spark MLlib batch onto Google Cloud picks Dataproc, because the existing Scala jars and Spark MLlib model fit Dataproc natively.
    • A marketing team integrating Salesforce, MySQL, SAP, and Cloud Storage into a unified reporting layer picks Cloud Data Fusion, because the plugin catalog already includes those connectors and the team has no engineers.
    • A platform team coordinating an ingestion job in Dataflow, a transformation chain in Dataform, a ML training run in Vertex AI, and a downstream notification in Pub/Sub picks Cloud Composer, because the cross-service graph is the actual artifact.

    Skill set and code ownership

    The skill set lens often dominates. Dataform requires SQL fluency and basic Git literacy.

    Dataflow requires Java or Python knowledge plus understanding of the Beam programming model (PCollections, transforms, windowing). Dataproc requires familiarity with the Spark or Hadoop API surface.

    Cloud Data Fusion requires only awareness of the source and sink schemas. Cloud Composer requires Python and Airflow operator knowledge.

    When the team has a single dominant skill, choosing against that skill creates a long tail of maintenance work. When the team is mixed, the choice can split: Dataform for the daily SQL marts, Dataflow for the streaming enrichment, Cloud Composer to glue them.

    Latency profile

    The latency profile is the second lens. A daily run can use any of the five tools.

    A micro-batch every five minutes is comfortable for scheduled queries, Dataform, Dataflow (in batch mode), Cloud Data Fusion (Enterprise edition with streaming), and short Cloud Composer DAGs.

    Sub-minute latency on continuous data is the domain of Dataflow streaming, because Beam was designed for that case.

    Dataproc supports Spark Structured Streaming but does not match Dataflow on autoscaling responsiveness for unbounded sources.

    Cloud Composer is a poor fit for sub-minute work because the scheduler heartbeat sits in the tens of seconds.

    Cost model summary

    The cost models differ enough to flip the decision on large workloads.

    • BigQuery slots dominate Dataform cost; large queries on on-demand pricing or low slot reservations can spike.
    • Dataflow charges per worker resource, so a heavy shuffle without Dataflow Shuffle inflates the bill.
    • Dataproc charges per VM hour, so an idle long-running cluster is the most expensive failure mode.
    • Cloud Data Fusion adds an instance fee on top of Dataproc compute, which is justified only when the visual builder offsets development time.
    • Cloud Composer adds an environment fee per hour regardless of DAG activity.

    💡 Exam Trap: Dataform is not an orchestrator across services. Dataform schedules its own SQLX graph but cannot call a Dataflow job or a Cloud Function. If the workflow spans BigQuery plus another service, expect the correct answer to be Cloud Composer or Workflows, not Dataform.

    💡 Exam Trap: Cloud Data Fusion runs on top of Dataproc. A question that says "we need a no-code transformation tool that runs on Spark" is steering toward Cloud Data Fusion, even though the engine underneath is Dataproc.

    📊 Limit: A Cloud Composer 2 environment supports up to 100 small node pools, and the Airflow database has a default maximum of 32 concurrent DAG runs per DAG. Both values are adjustable through the environment configuration.

    ⚠️ Anti-Pattern: Picking Dataflow for a pure SQL transformation that targets BigQuery. The pipeline becomes a thin Beam wrapper around a SQL statement, costs more per run than a scheduled query, and produces no advantage on autoscaling because the bottleneck is the BigQuery write.

    🎯 Scenario: A team needs to clean nested JSON from Pub/Sub, deduplicate by event ID, enrich with a static reference table in Cloud Storage, and write to BigQuery within five seconds of arrival. The right pick is Dataflow streaming. Dataform cannot read Pub/Sub. Dataproc Structured Streaming can read it but the autoscaling on the unbounded source is slower than Dataflow Streaming Engine. Cloud Data Fusion streaming pipelines exist but require the Enterprise edition and add an instance fee for a workload that does not need the visual builder.

    Decision Anchor. Choose Dataform when the entire transformation is SQL on BigQuery and the team owns the SQL. Choose Dataflow when the workload mixes batch and streaming, when exactly-once on Pub/Sub matters, or when complex stateful logic must run outside SQL.

    Choose Dataproc when existing Spark or Hadoop code is the artifact. Choose Cloud Data Fusion when no-code, connector-driven assembly is the constraint.

    Choose Cloud Composer when the workflow crosses multiple services and needs explicit dependency, retry, and SLA management. ---

    Continue with the interactive course

    Track your progress, jump into practice questions and use the Shark AI tutor inside the GCP - Associate Data Practitioner learning hub.