Drive Dataproc Spark jobs from a real pipeline.

Dataproc runs the Spark. Kestra runs everything around the submit: trigger it on a schedule or event, gate it on upstream readiness, chain it from GCS to BigQuery, and get per-step retries and one execution history across the whole lakehouse.

Blueprints for Dataproc orchestration.

Submitting a Spark job is one API call; the pipeline around it is not. Kestra runs Dataproc Serverless batches as steps in a flow: it gates a job on a BigQuery readiness check, chains GCS to Spark to BigQuery, fans batches out over partitions, and adds retries, backfills, and alerting that the Dataproc API alone does not provide. Serverless batches provision and tear down their own compute, so there is no cluster to manage.

Run a Spark batch on Dataproc ServerlessOpen blueprint
GCS to Dataproc to BigQuery refreshOpen blueprint
Gate a PySpark batch on data readinessOpen blueprint

Above the Dataproc submit call.

Dataproc runs the Spark engine and the serverless compute. Kestra runs the steps around the batch: what triggers it, what it depends on, what it chains to, and how it is retried.

Serverless batches, no cluster to manage

Dataproc Serverless batches provision compute, run, and tear it down per job. Kestra submits io.kestra.plugin.gcp.dataproc.batches.SparkSubmit or PySparkSubmit on a schedule or event, so there is no cluster to size, keep warm, or forget to delete, and cost tracks the job rather than uptime.

Gate a job on upstream readiness

Running Spark on missing data wastes compute. Kestra checks BigQuery (or a GCS marker) for fresh rows, then an If submits the batch only when the readiness check passes. This is the dependency Dataproc cannot express: do not burn compute until the upstream data has landed.

GCS to Spark to BigQuery in one flow

The lakehouse chain is multi-step: stage raw files, transform with Spark, load the curated output. Kestra runs PySparkSubmit against GCS data, then bigquery.LoadFromGcs into a gold table, as ordered steps with retries and one execution ID across the chain.

Retries, backfills, and replay

A failed submit has no automatic recovery across the broader pipeline. Kestra retries individual steps with backoff, backfills a dated range, and replays from the failing task, so a transient batch failure does not mean re-running everything by hand or losing the run's history.

Spark, PySpark, and Spark SQL

Different jobs need different entry points. Kestra submits JVM Spark with SparkSubmit, Python with PySparkSubmit, and SQL scripts with SparkSqlSubmit, each as a typed task, so a mixed-language Spark workload runs from one declarative flow instead of scattered submit scripts.

Chained with dbt and the warehouse

Dataproc has no view of the dbt models or the warehouse it feeds. Kestra runs the Spark batch, then a dbt build, then a BigQuery validation query, so heavy transformation and analytics-engineering steps live in one flow with shared run IDs.

How teams use Dataproc and Kestra

Patterns data engineering teams run in production today. Each one shows the flow end to end, with the real plugin classes in play.

Serverless

Submit a Spark batch with no cluster to manage

A Spark job needs to run on a cadence without a standing cluster. Kestra submits it to Dataproc Serverless on a Schedule, which provisions and tears down its own compute per run, and Slack reports the final batch state. Cost tracks the job, not uptime.

No cluster lifecycle

Serverless batches provision and tear down compute automatically.

Cost tracks the job

You pay for the batch, not for a cluster sitting idle between runs.

Scheduled with retries

A failed batch retries; the run lands in execution history.

Schedule icon
schedule
nightly
SparkSubmit icon
spark submit
serverless batch
SlackIncomingWebhook icon
slack
batch state
Lakehouse

Run the GCS to Spark to BigQuery chain

Raw files in GCS need transformation before analytics. Kestra runs a PySpark batch that reads the raw data and writes curated Parquet back to GCS, then loads it into a BigQuery gold table. Microsoft Teams confirms the refresh.

Raw to gold in one flow

Transform with Spark, then load the curated output to the warehouse.

One execution ID

Debug the Spark step and the load from a single run view.

Event-driven option

Trigger on a GCS marker file instead of a schedule.

Schedule icon
schedule
daily
PySparkSubmit icon
pyspark submit
transform
LoadFromGcs icon
bigquery load
load gold
TeamsIncomingWebhook icon
teams
on complete
Readiness gate

Gate a PySpark batch on data readiness

A nightly batch should not run on a half-loaded source. Kestra queries BigQuery for today's row count, and an If submits the PySpark batch only when the count clears the bar, otherwise it skips and reports. Discord confirms either outcome.

No wasted compute

The batch runs only when the source data has actually landed.

Skip is explicit

A not-ready run reports a skip instead of failing silently.

Tune the rule

Swap the count check for a freshness timestamp or marker file.

Query icon
bigquery query
readiness check
If icon
gate
ready?
PySparkSubmit icon
pyspark submit
run on pass
DiscordIncomingWebhook icon
discord
ran or skipped
Transform

Chain Spark SQL with a dbt build

Heavy SQL transformation runs in Spark, modeling runs in dbt. Kestra submits a Spark SQL batch, then runs dbt build on the result, then validates with a BigQuery query, so the two transformation layers run as one flow with shared run IDs. Email confirms.

Two layers, one flow

Spark SQL and dbt run in order with outputs flowing between them.

Validate before publish

A BigQuery check gates anything that reads the result.

Shared run IDs

The Spark batch and dbt build share one execution for debugging.

SparkSqlSubmit icon
spark sql
heavy transform
DbtCLI icon
dbt build
model
Query icon
bigquery query
validate
MailSend icon
email
on complete
Fan-out

Fan PySpark batches out over partitions

Reprocessing many partitions one after another is slow. Kestra fans the submits out with a ForEach, running a PySpark batch per partition in parallel on Dataproc Serverless, then reports completion. A backfill that took hours serially finishes as parallel batches.

Parallel partitions

ForEach submits a batch per partition concurrently.

Serverless scales out

Each batch gets its own compute, so parallel runs do not contend.

Bounded concurrency

A concurrency limit caps how many batches run at once.

Schedule icon
schedule
backfill
ForEach icon
for each
per partition
PySparkSubmit icon
pyspark submit
batch per partition
TelegramSend icon
telegram
on complete

Kestra vs the orchestration alternatives Dataproc teams evaluate

Capability
Cloud Composer
Dagster
Airflow
Submit Spark on a schedule or event
Native batch tasks + triggers
SubmitJob operator, PythonCustom op, PythonSubmitJob operator, Python
Gate a job on upstream readiness
If on a BigQuery check
Sensor + branch, PythonAsset checks, PythonSensor, Python
GCS to Spark to BigQuery in one flow
Native plugins
Operator chain, PythonAssets, PythonOperator chain, Python
Serverless, no cluster to manage
batches.* serverless
You wire operatorsYou manage computeYou wire operators
Retries and backfills across the pipeline
Per-task, built in
Yes, Python configYes, Python configYes, Python config
Declarative YAML, no Python
Pure YAML
Python DAGsPythonPython DAGs
Self-hosted or air-gapped option
Open source, self-hosted
GCP-managedOSS or cloudSelf or managed

Dataproc & Kestra: common questions

Find answers to your questions right here, and don't hesitate to Contact Us if you couldn't find what you're looking for.

See How

Ready to orchestrate your Dataproc jobs?

Submit serverless Spark batches, gate them on data readiness, chain GCS to Spark to BigQuery, and fan out over partitions in one flow. Open source, self-hosted, event-driven.