TECHNOLOGIESTieInn Technologies

Dataproc

GCP · 14 questions

Short notes

Key idea

Dataproc runs managed Spark and Hadoop clusters on Google Cloud. Use it when you already have Spark code or need Spark's libraries; create a cluster for a job and delete it afterwards, or use Dataproc Serverless.

Syntax

gcloud dataproc clusters create etl --region=asia-south1 \
  --num-workers=2 --max-idle=30m
gcloud dataproc jobs submit pyspark job.py --cluster=etl --region=asia-south1
gcloud dataproc batches submit pyspark job.py --region=asia-south1   # serverless
  • Read and write gs:// paths directly (data in GCS, not HDFS).
  • Preemptible/spot secondary workers lower cost.
  • Connectors for BigQuery and Cloud Storage.

Example

A nightly PySpark job turns a day of raw JSON in GCS into partitioned Parquet. Airflow creates the cluster, submits the job and deletes the cluster, so you pay for about 20 minutes a day.

Traps

  • A forgotten cluster bills around the clock; set --max-idle or use Serverless.
  • Storing data on cluster disks (HDFS) loses it when the cluster is deleted; use GCS.
  • Choose Dataproc for Spark, BigQuery for SQL, and Dataflow for Beam/streaming.
  • Spot workers can disappear mid-job; keep the main workers on standard VMs.

Want the full lesson with step-by-step examples, a project and a certificate? GCP course, ₹120 →

Questions

5 free questions
5 questions

    Dataproc

  1. Question 1easy

    What is Dataproc?

  2. Dataproc

  3. Question 2medium

    A Spark job runs for 40 minutes each night. What's the most cost-efficient setup?

  4. Dataproc

  5. Question 3medium

    Why keep Dataproc input and output in Cloud Storage instead of the cluster's HDFS?

  6. Dataproc

  7. Question 4medium

    When are Spot (preemptible) secondary workers a good idea?

  8. Dataproc

  9. Question 5medium

    Data scientists run Spark notebooks interactively all day. Which Dataproc option fits best?

9 more questions on this topic, with hints, and tests

Sign up free for 21 days of every question and test.