Data FlowData Flow
DataFlow
  • User Manual
  • Developer Manual
  • Examples
  • API Reference
Overview
Getting Started
Pipeline Authoring
Execution
    Execution LifecycleBatch vs StreamCheckpoints and OffsetsSchedules
Deployment
Troubleshooting
Examples
Execution

Execution Lifecycle

Runs are asynchronous: triggering a pipeline returns 202 Accepted with a runId immediately, the Spark driver executes in the background, and everything about the run - status, stages, row counts, samples, logs - is observable through the API.

At a glance

  • Asynchronous - trigger returns 202 Accepted with a runId; the driver runs in the background.
  • Five statuses - PENDING, then RUNNING, then a terminal SUCCESS, FAILED, or CANCELLED.
  • Observable through the API - stages, row counts, samples, logs, and the executed spec snapshot.

Triggering a run

PathWhat it does
POST /api/pipelines/{id}/execRuns a saved pipeline
POST /api/pipelines/save-and-execCreates the pipeline and runs it in one call
SchedulerFires due schedules automatically (attributed to the system user)
POST /api/local/runLocal profile only - runs in-process Spark

Every submission path checks the license first, then creates a PipelineRun row and submits the job to the Spark Master REST API (/v1/submissions/create) with the engine jar and arguments --spec, --pipelineParams, --runId. Spec execution.settings override the Spark submit defaults for that run.

Statuses

A run moves from PENDING to RUNNING to one terminal state; the control plane reconciles active runs against Spark every 30 seconds:

Run lifecycle
TriggerIn flightSuccessFailedCancelled
StatusMeaning
PENDINGRun row created, submission in flight
RUNNINGSpark driver executing
SUCCESSAll stages done - offsets and state committed
FAILEDA stage failed - state discarded, offsets unchanged
CANCELLEDKilled via the API

What happens during a run

The driver reports progress straight to PostgreSQL - not back through the API:

  1. RUNNING is set when the driver starts
  2. Sources read, builds join, transforms apply, destinations write - each stage emits start/success/failure events with row counts and a 5-row sample
  3. On success: stateful step state commits, offsets commit, run completes as SUCCESS
  4. On failure: state is discarded, the run ends as FAILED with the failing stage named in the error

The control plane reconciles status on its own schedule - every 30 seconds (pipeline.run-status-checker.interval-ms) it polls Spark for every RUNNING run:

Spark driver stateRun status
FINISHEDSUCCESS
FAILED / ERRORFAILED
KILLEDCANCELLED
RUNNING / SUBMITTED / ACCEPTEDno change

Stages

Every run tracks its stages by FQN - sources.<s>.<a>, builds.<b>, transforms.<t>, destinations.<d>.<o> - each with a status (RUNNING / SUCCESS / FAILED), output row count, failure reason, and a lineage sample:

TerminalCode
curl -H "Authorization: Bearer $TOKEN" \ "http://localhost:8080/api/pipelines/$PIPELINE_ID/runs/$RUN_ID/stages" # one stage, or its lineage data curl -H "Authorization: Bearer $TOKEN" \ "http://localhost:8080/api/pipelines/$PIPELINE_ID/runs/$RUN_ID/stages/sources.orders.orders/lineage/data"

Killing a run

TerminalCode
curl -X POST -H "Authorization: Bearer $TOKEN" \ "http://localhost:8080/api/pipelines/$PIPELINE_ID/runs/$RUN_ID/kill"

The app kills the Spark submission and marks the run CANCELLED; stages still RUNNING are marked FAILED. Terminal runs (SUCCESS, FAILED, CANCELLED) refuse the kill. Because the run never completed, offsets and state are not committed.

Run history

Every run snapshots the exact spec that executed - updates create new immutable versions, so history stays accurate:

TerminalCode
curl -H "Authorization: Bearer $TOKEN" \ "http://localhost:8080/api/pipelines/$PIPELINE_ID/runs?status=RUNNING" # the spec snapshot for a specific run curl -H "Authorization: Bearer $TOKEN" \ "http://localhost:8080/api/pipelines/$PIPELINE_ID/runs/$RUN_ID/spec"

Read status from the runs list - the single-run status endpoint is not implemented yet. Filter with status, startedAtFrom/To, or just read the latest entry.

Driver logs

TerminalCode
curl -H "Authorization: Bearer $TOKEN" \ "http://localhost:8080/api/pipelines/$PIPELINE_ID/runs/$RUN_ID/logs?stream=stdout&tail=200"

Parameters: stream (stdout | stderr), tail (last N lines, default 2000), grep (filter). While a run is RUNNING, poll every 3-5 seconds with a tail; when it reaches a terminal status, fetch the final logs once.

When driver-log archiving is enabled (object/single modes), logs are read from the archive first - final logs, then live snapshots, then the Spark Master UI proxy - so logs stay readable after the containers are gone.

Failure semantics

EventOffsetsStateful step state
Run succeedscommittedcommitted
Run failsunchangeddiscarded
Run killedunchangeddiscarded

A failed or killed run leaves the pipeline exactly where it was - the next run re-reads from the previous watermark (at-least-once). See Checkpoints and Offsets.

Related pages

  • Checkpoints and Offsets - commit semantics in depth
  • Schedules - cron triggers and missed-run behavior
  • Batch vs Stream - run behavior per mode
  • Execution Settings - Spark resources per run
  • Common Errors - decoding failed runs
  • API Reference - the full runs surface
Suggest edit
Last modified on November 26, 2026
Execution SettingsBatch vs Stream
On this page
  • At a glance
  • Triggering a run
  • Statuses
  • What happens during a run
  • Stages
  • Killing a run
  • Run history
  • Driver logs
  • Failure semantics
  • Related pages