đ Runink Quickstart: CDM Trade Pipeline
This example shows how to define, test, apply, and run a declarative data pipeline using Runink.
đ ď¸ Prerequisites
Ensure you have:
- A
.dsl
scenario:features/cdm_trade/trade_cdm.dsl
- A Go contract file:
contracts/trade_cdm_multi.go
- Golden test files:
golden/cdm_trade/
- Sample input data:
golden/cdm_trade/input.json
Our example presents the following:
Kafka (raw)
â DecodeCDMEvents
â sf://control.decoded_cdm_events
â ValidateLifecycle
âââ sf://control.invalid_cdm_events (if !valid)
âââ TagWithFDC3Context
â
sf://cdm.validated_trade_events
đĄ Example Flow
# Create a secure namespace (herd)
runi herd create finance
# Run the pipeline in test mode against golden test files
runi test \
--scenario features/cdm_trade/cdm_trade.dsl \
--golden golden/cdm_trade \
--herd finance
# Compile + apply the DAG
runi apply \
--scenario features/trade_cdm.dsl \
--contract contracts/cdm_trade/trade_cdm_multi.go \
--herd finance \
--out dags/cdm_trade/trade_cdm_dag.go
# Execute the pipeline with test input
runi run \
--scenario features/cdm_trade/trade_cdm.dsl \
--herd finance \
--input golden/cdm_trade/input.json
đ Inspect Pipeline Execution
After running, inspect the pipeline using:
runi status --run-id RUN-20240424-XYZ --herd finance
Example Output
run_id: RUN-20240424-XYZ
herd: finance
status: completed
steps:
- DecodeCDMEvents:
processed: 2
output: sf://control.decoded_cdm_events
- ValidateLifecycle:
passed: 1
failed: 1
output:
- valid â sf://cdm.validated_trade_events
- invalid â sf://control.invalid_cdm_events
- TagWithFDC3Context:
enriched: 1
context_prefix: fdc3.instrumentView:
lineage:
contract_hash: a9cd23fâŚ
contract_version: v3
created_by: service-account:etl-runner
đ Follow-Up Commands
runi lineage --run-id RUN-20240424-XYZ
runi logs --run-id RUN-20240424-XYZ
runi publish --herd finance --scenario features/cdm_trade/cdm_trade.dsl
Runink makes secure, declarative data orchestration easy â every pipeline is testable, auditable, and reproducible.