Running pipelines¶
dpone run is the canonical user-facing command for executing one manifest process. Operational commands under dpone ops wrap the release, evidence, approval, and deployment lifecycle around this runtime path, but they do not replace it.
CLI quickstart¶
Single-process manifest:
Batch manifest with an explicit selector:
With registry defaults:
With retry/backoff for transient failures:
dpone run manifests/dwh_batch.yaml \
--selector orders \
--retry-attempts 2 \
--retry-backoff-seconds 5 \
--format json
Python quickstart¶
Use dpone.run(...) when embedding dpone in a Python application, notebook, or custom scheduler:
import dpone
report = dpone.run(
"manifests/orders_to_landing.yaml",
selector="orders",
run_id="orders_2026_06_05",
registry_paths=("config/source_registry.yaml",),
retry_attempts=2,
retry_backoff_seconds=5.0,
)
if not report.passed:
raise RuntimeError(report.result.errors)
print(report.result.inserted_rows)
The same API is also available as dpone.api.run:
What happens under the hood¶
flowchart LR
CLI["dpone run"] --> Loader["ManifestLoaderRouter"]
Python["dpone.run(...)"] --> Loader
Loader --> Resolve["resolve_single_process"]
Resolve --> Process["ETLProcess"]
Process --> Port["ProcessRunner port"]
Port --> Runtime["DefaultRuntimeHydrator + ETLProcessor"]
Runtime --> Result["RunManifestResult"]
Execution steps:
- Load the manifest with
metadata_only=falseso runtime bindings and credentials can be resolved. - Select exactly one process by
--selector, process name, or single-process manifest default. - Create a
RunContextwith the requestedrun_idor the process name. - Execute
ETLProcess.run(). - If retry is configured and the result is not success-like, wait for the configured backoff and execute a new attempt.
- Delegate each attempt through the
ProcessRunnerport. - Return
RunManifestResultwith the underlying finalProcessResult, attempt count, row counts, duration, status, and errors.
Runtime lifecycle gates¶
Every dpone run attempt uses the same runtime lifecycle inside
ETLProcessor. The order is fail-closed:
flowchart TD
Extract["Extract source artifact"]
Lineage["Enrich lineage / strategy metadata"]
Contract["Runtime data contract enforcement"]
Evolution["Schema evolution"]
Compatibility["Target type compatibility gate"]
PhysicalDDL["Physical DDL apply gate"]
Stage["Staging load"]
Finalize["Sink finalizer"]
Evidence["Data contract evidence"]
AuditCommit["__dpone__loads committed"]
SourceState["Source/Kafka/XMin state commit"]
Extract --> Lineage
Lineage --> Contract
Contract -->|strict failure| Fail["fail without target load or state commit"]
Contract -->|valid/quarantined| Evolution
Evolution --> Compatibility
Compatibility --> PhysicalDDL
PhysicalDDL --> Stage
Stage --> Finalize
Finalize --> Evidence
Evidence --> AuditCommit
AuditCommit --> SourceState
Important guarantees:
| Gate | Production behavior |
|---|---|
| Runtime contracts | strict rejects block target load and state commit. quarantine keeps target rows clean and writes bad rows to quarantine. |
| Type compatibility | Unsafe narrowing or incompatible target type changes fail before finalization unless an explicit policy routes them to a variant column or quarantine. |
| Physical DDL apply | Runs only when sink.options.physical_design.apply_runtime: true and the sink exposes a DDL executor. Blocking existing-table DDL remains blocked in online mode. |
| Evidence | data_contract_evidence.json is written before load audit/source state commit when runtime_evidence.output_dir is configured. |
| State | Source/Kafka/XMin state advances only after sink load, evidence, and load audit commit succeed. |
Example manifest fragment:
schema_contract:
enforcement: quarantine
columns:
amount:
type: decimal
precision: 18
scale: 2
nullable: false
sink:
options:
schema_contract:
enforcement: quarantine
columns:
amount:
type: decimal
precision: 18
scale: 2
nullable: false
type_inference:
conflict_policy: quarantine
physical_design:
apply_runtime: true
apply: online
runtime_evidence:
output_dir: .dpone/evidence/orders
quarantine:
dir: .dpone/quarantine
The resulting JSON report exposes the data contract evidence path under
result.reconciliation_metrics.data_contract_evidence.
Retry policy¶
Retries are off by default:
Enable retries only for idempotent or resumable pipelines:
Retry behavior:
| Setting | Meaning |
|---|---|
--retry-attempts 0 |
Default. One attempt only. |
--retry-attempts 3 |
One initial attempt plus three retries; max_attempts=4. |
--retry-backoff-seconds 10 |
Sleep 10 seconds between failed attempts. |
Python retry_attempts |
Same behavior as CLI. |
Python retry_backoff_seconds |
Same behavior as CLI. |
Safety model:
- A retry is triggered only when the previous attempt returns a non-success
ProcessResult. - Success-like statuses are
success,completed, andsucceeded, with no errors. dpone rundoes not hide failed attempts; the final report includesattemptsandmax_attempts.- State advancement must still happen only after committed loads in the runtime/load lifecycle.
- Do not enable retries for non-idempotent custom sinks unless they use staging-first finalization and committed-load guards.
Output formats¶
Text is the default:
JSON is recommended for automation:
Markdown is useful for release notes or runbooks:
Exit codes¶
| Exit code | Meaning |
|---|---|
0 |
Process finished with a success-like status and no errors. |
1 |
Process executed but returned a non-success status or errors. |
2 |
Manifest/configuration error before execution. |
130 |
Interrupted by the user. |
Common runbooks¶
dpone run is missing¶
- Verify the installed version with
python -c "import dpone; print(dpone.__version__)". - Run
dpone run --help. - If the command is missing, upgrade to a version that includes the restored top-level run command.
- Do not use
dpone opscommands as a replacement for process execution; they are operational controls around a run.
Batch manifest has multiple processes¶
Symptom:
Fix:
Selector not found¶
- Run
dpone manifest render manifests/dwh_batch.yaml --all. - Copy the
selectoror processnameexactly. - Re-run
dpone run ... --selector <selector>.
Credentials or optional dependencies fail¶
- Run
dpone doctor --profile local. - Confirm the relevant extra is installed, for example
dpone[postgres],dpone[mssql],dpone[clickhouse], ordpone[kafka]. - Confirm
connection_typematches your configured credential source. - See Connections and credentials.
Runtime returned failed status¶
- Re-run with
--format jsonand inspectresult.errors. - Check source/sink credentials and permissions.
- Check load strategy compatibility in Load strategies.
- If the error mentions data contracts, inspect Runtime data contracts and quarantine files.
- If the error mentions physical DDL, inspect Physical DDL apply.
- For production releases, attach the JSON output to
dpone ops evidence-bundleor the incident pack.
Retry exhausted¶
- Inspect
attempts,max_attempts, andresult.errorsin JSON output. - Check whether the failure is transient: network timeout, connection reset, temporary lock, or API 429.
- If the failure is deterministic, fix the manifest/source/sink before increasing retries.
- If the sink is not idempotent, do not retry until the load strategy is staging-first and state-safe.
- For recurring jobs, prefer scheduler-level alerting plus
dpone ops run-registryevidence.
Related commands¶
| Need | Command |
|---|---|
| Validate manifest before execution | dpone manifest validate <path> |
| Inspect effective manifest | dpone manifest render <path> |
| Preview source/sink/staging plan | dpone plan <path> |
| Execute one process | dpone run <path> |
| Write local run artifact manually | dpone run-report --run-id ... --pipeline ... |
| Build operational release evidence | dpone ops release-orchestrator |