Acceldata
ADOC

Last updated: Oct 14, 2026 10:29 UTC

Pipeline Continuation IDs (Multi-Script Runs)

A continuation ID lets multiple scripts or services update the same pipeline run in Acceldata Data Observability Cloud (ADOC).

You assign the continuation ID when the first script creates the run. Later scripts use the same ID to retrieve the run and update it, and the last script completes it. This page assumes that you're familiar with creating pipelines, runs, and spans, as described in Pipelines Guide. The examples read the connection details from the URL, ACCESS_KEY, and SECRET_KEY environment variables. For client setup, see acceldata-sdk-python Overview.

When to Use Continuation IDs

Use a continuation ID when:

  • A workflow runs across multiple scripts.
  • Different services report progress to the same logical run.
  • An orchestrator triggers separate processes such as cron jobs or CI jobs.

How Continuation IDs Work

  • The first script creates the run and assigns it a continuation ID.
  • Each later script retrieves the run by using the same pipeline UID and continuation ID.
  • The last script sets the run's final status and result.

Step 1: Create a Run with a Continuation ID

In the first script, pass a PipelineRunInput with a continuation_id to create_pipeline_run(). Use an ID that identifies only this logical run, for example by including the batch period, as in monthly-reporting-2026-07.
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")

The first script creates the run and its root span, but doesn't set a final status. Later scripts can continue to update the run.

Step 2: Retrieve and Complete the Run in Another Script

In each later script, retrieve the pipeline by its UID, and then call get_run() with the same continuation ID. The method returns the existing run, so the script can add spans, jobs, and events to it as described in Pipelines Guide. In the last script, call update_pipeline_run() to set the run's final status and result.

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,
)

If a script fails and the workflow can't continue, update the run with PipelineRunStatus.FAILED and PipelineRunResult.FAILURE instead of leaving it open. For an example of error handling, see End-to-End Pipeline Lifecycle Example.

Best Practices

  • Use a unique continuation ID for each logical run, and reuse it only within that run.
  • Use the same pipeline UID in all scripts.
  • Don't set a final status on the run until the last script finishes. After a run is complete, later scripts can't update it.
  • When possible, create the run in only one script.

Troubleshooting

Symptom

Cause and Solution

Run not found

The continuation ID or pipeline UID doesn't match the values used to create the run. Verify both values.

Wrong run attached

The same continuation ID was reused for a different logical run. Use a unique continuation ID for each logical run.

A later script can't update the run

An earlier script set a final status on the run. Set the final status only in the last script.

What's Next

After you complete this section, explore: