Pipeline Continuation IDs (Multi-Script Runs)
A continuation ID lets multiple scripts or services update the same pipeline run.
When to Use Continuation IDs
Use a continuation ID when:
A workflow runs across multiple scripts.
Different services report progress into one logical run.
An orchestrator triggers separate processes (for example, cron or CI jobs).
Core Idea
Script 1 creates the run with a
continuation_id.Later scripts fetch the same run with the same
continuation_id.The final script marks the run complete.
Step 1: Create a Run with a Continuation ID
import os
from acceldata.client.adoc_client import AdocClient
from acceldata.models.sdk.pipeline.create_pipeline_input_request import (
CreatePipelineInputRequest,
)
from acceldata.models.sdk.pipeline.pipeline_run_input import PipelineRunInput
ADOC_URL = os.environ.get("URL", "https://<your-adoc-url>")
ADOC_ACCESS_KEY = os.environ.get("ACCESS_KEY", "<your-access-key>")
ADOC_SECRET_KEY = os.environ.get("SECRET_KEY", "<your-secret-key>")
PIPELINE_UID = os.environ.get("PIPELINE_UID", "sdk_snippet_customers_pipeline")
client = AdocClient(
url=ADOC_URL,
access_key=ADOC_ACCESS_KEY,
secret_key=ADOC_SECRET_KEY,
connection_timeout_ms=30000,
read_timeout_ms=30000,
)
pipeline = client.create_pipeline(
CreatePipelineInputRequest(
uid=PIPELINE_UID,
name="Monthly reporting pipeline",
)
)
continuation_id = "monthly-reporting-2026-07"
run = pipeline.create_pipeline_run(
PipelineRunInput(continuation_id=continuation_id),
)
run.create_root_span(uid="root.span.uid")
Step 2: Attach in Another Script and Complete the Run
import os
from acceldata.client.adoc_client import AdocClient
from acceldata.models.sdk.pipeline.pipeline_run_input import (
PipelineRunResult,
PipelineRunStatus,
)
ADOC_URL = os.environ.get("URL", "https://<your-adoc-url>")
ADOC_ACCESS_KEY = os.environ.get("ACCESS_KEY", "<your-access-key>")
ADOC_SECRET_KEY = os.environ.get("SECRET_KEY", "<your-secret-key>")
PIPELINE_UID = os.environ.get("PIPELINE_UID", "sdk_snippet_customers_pipeline")
client = AdocClient(
url=ADOC_URL,
access_key=ADOC_ACCESS_KEY,
secret_key=ADOC_SECRET_KEY,
connection_timeout_ms=30000,
read_timeout_ms=30000,
)
continuation_id = "monthly-reporting-2026-07"
pipeline = client.get_pipeline(PIPELINE_UID)
run = pipeline.get_run(continuation_id=continuation_id)
pipeline = client.get_pipeline(PIPELINE_UID)
run.update_pipeline_run(
result=PipelineRunResult.SUCCESS,
status=PipelineRunStatus.COMPLETED,
)
Rules to Keep Runs Consistent
Use one
continuation_idper logical run.Use the same pipeline UID in all scripts.
Do not mark the run terminal until the final step.
Keep run creation to one owner script when possible.
Troubleshooting
Symptom | Likely Cause |
|---|---|
Run not found | Check the |
Wrong run attached | The same continuation ID was reused for a different logical run. |
Downstream script cannot write | The run was completed too early. |

Send a comment