Compare / Dataflow vs Dataproc

Dataflow vs Dataproc

Choose Dataflow for Apache Beam batch or streaming pipelines, especially when event-time processing and late data matter. Choose Dataproc for existing Spark or Hadoop workloads that you want to run without rewriting for Beam. Both have managed execution options; the programming model and migration effort matter more than the word serverless.

In 49 practice questions across 8 practice banks

Professional Data Engineer Dataproc

Your company is migrating their 30-node Apache Hadoop cluster to the cloud. They want to re-use Hadoop jobs they have already created and minimize the management of the cluster as much as possible. They also want to be able to persist data beyond the life of the cluster. What should you do?

  1. Dataflow would require rewriting the Hadoop jobs.

  2. HDFS on persistent disks is tied to the cluster's lifecycle.

  3. Self-managed Hadoop on Compute Engine maximizes management overhead.

  4. Dataproc with the GCS connector is managed and persists data beyond the cluster.

  5. Self-managed, and Local SSD data is lost when instances stop.

Pick an answer to see why each option is right or wrong.

Try 20 questions free

At a glance

DataflowDataproc
Programming modelApache Beam (Java, Python, Go, SQL)Spark, Hadoop, Hive, Pig, Presto and other OSS tools
StreamingFirst-class: windows, watermarks, triggers, exactly-onceSpark Structured Streaming
OperationsServerless; autoscaling workersClusters you size (ephemeral recommended) or Dataproc Serverless
Migration fitNew pipelines, or rewritesExisting Spark or Hadoop jobs with minimal changes
Storage patternReads and writes Pub/Sub, BigQuery, Cloud Storage and morePrefer Cloud Storage over HDFS so clusters can be ephemeral

Choose Dataflow when

  • You are building a new pipeline, especially a streaming one.
  • A new Beam streaming pipeline must aggregate events into time windows and handle late arrivals.
  • The team wants to use the Apache Beam model for both batch and streaming processing.

Choose Dataproc when

  • You already have Spark or Hadoop jobs and want to move them without rewriting.
  • The team works in the Spark ecosystem (Spark SQL, MLlib, notebooks).
  • You need specific open-source components that Beam does not provide.

Exam tip

Existing Spark jobs or migration without rewriting point to Dataproc. Apache Beam, event-time windows and late-data handling point to Dataflow. Serverless alone does not decide: Dataproc also offers serverless Spark workloads.

Official documentation