This guide helps you move from the legacy Python package acceldata-sdk (import namespace acceldata_sdk, client TorchClient) to acceldata-sdk-python (import namespace acceldata, client AdocClient).
Legacy package notice
acceldata-sdk-python is the supported path for catalog, pipeline, policy, and tagging workflows against ADOC. acceldata-sdk is now in maintenance mode and is supported for up to three additional releases. For an overview of why to migrate, see Migration Guide and New Features Overview.
acceldata-sdk-python uses OpenAPI-generated models (Pydantic v2), typed resource wrappers, and a clearer separation between API transport errors and SDK workflow errors.
At a Glance
Topic | Legacy (acceldata-sdk) | New (acceldata-sdk-python) |
|---|
PyPI package | acceldata-sdk
| acceldata-sdk-python
|
Import root | acceldata_sdk
| acceldata
|
Client class | TorchClient
| AdocClient
|
Python version | 3.7+ | 3.10+ |
Models | Hand-written classes / dataclasses | OpenAPI-generated Pydantic models + SDK resource wrappers |
Pipeline return types | Pipeline, PipelineRun with embedded client
| PipelineResource, PipelineRunResource, SpanResource
|
Policy execution type param | policy_type: PolicyType
| rule_type: RuleType
|
Incremental policy runs | incremental=True on execute_policy
| PolicyExecutionInput(executionType=PolicyExecutionType.INCREMENTAL)
|
Job I/O references | Node
| JobInputOutputRef
|
Job / pipeline metadata | JobMetadata, PipelineMetadata
| Meta
|
Policy status | get_policy_status
| get_policy_execution_status
|
SDK usage errors | TorchSdkException
| AcceldataSdkException (+ specific subclasses)
|
Connection timeouts | torch_connection_timeout_ms, torch_read_timeout_ms
| connection_timeout_ms, read_timeout_ms
|
Prerequisites
Upgrade Python to 3.10 or newer. The new SDK does not support Python 3.7–3.9.
Align SDK and ADOC versions. Install an acceldata-sdk-python release that matches your ADOC deployment.
Plan a dependency swap, not a side-by-side install. Both packages target overlapping functionality but use different import paths. Migrate imports and remove acceldata-sdk from requirements.txt or pyproject.toml when done.
Step 1: Change the Package
Before:
pip install acceldata-sdk
After:
pip uninstall acceldata-sdk # when you are ready to cut over
pip install acceldata-sdk-python
Update dependency files:
- acceldata-sdk>=26.4.0
+ acceldata-sdk-python>=<target-version>
Step 2: Update Imports and Client Construction
Client
Legacy | New |
|---|
from acceldata_sdk.torch_client import TorchClient
| from acceldata.client.adoc_client import AdocClient
|
TorchClient(url=..., access_key=..., secret_key=...)
| AdocClient(url=..., access_key=..., secret_key=...)
|
torch_connection_timeout_ms
| connection_timeout_ms
|
torch_read_timeout_ms
| read_timeout_ms
|
do_version_check (deprecated, unused)
| Removed — not supported |
Before:
from acceldata_sdk.torch_client import TorchClient
client = TorchClient(
url="https://<your-adoc-url>",
access_key="<access-key>",
secret_key="<secret-key>",
torch_connection_timeout_ms=10_000,
torch_read_timeout_ms=20_000,
)
After:
from acceldata.client.adoc_client import AdocClient
client = AdocClient(
url="https://<your-adoc-url>",
access_key="<access-key>",
secret_key="<secret-key>",
connection_timeout_ms=10_000,
read_timeout_ms=20_000,
# Optional: verify_ssl=False, or a path to a CA bundle for private TLS
)
Constants
Legacy | New |
|---|
acceldata_sdk.constants.TORCH_CONNECTION_TIMEOUT_MS
| acceldata.constants.CONNECTION_TIMEOUT_MS
|
acceldata_sdk.constants.TORCH_READ_TIMEOUT_MS
| acceldata.constants.READ_TIMEOUT_MS
|
Environment Variables (Scripts / Operators)
If you configure the client from the environment (common in Airflow and CI), rename the timeout variables:
Legacy | New |
|---|
TORCH_CONNECTION_TIMEOUT_MS
| CONNECTION_TIMEOUT_MS
|
TORCH_READ_TIMEOUT_MS
| READ_TIMEOUT_MS
|
URL, ACCESS_KEY, and SECRET_KEY are unchanged.
Step 3: Error Handling
Before:
from acceldata_sdk.errors import APIError, TorchSdkException
After:
from acceldata.exceptions import APIError, ApiException, AcceldataSdkException
Legacy | New | When Raised |
|---|
APIError
| APIError (and status-specific subclasses such as NotFoundError)
| ADOC returned a non-2xx HTTP response. |
— | ApiException
| Network or transport failure before a response. |
TorchSdkException
| AcceldataSdkException
| Invalid SDK usage or workflow failure (for example, a policy result with FailOnError). |
Step 4: Pipelines
The largest behavioral change is the resource wrapper pattern. Legacy TorchClient methods returned Pipeline / PipelineRun objects that carried a hidden client reference and exposed methods like create_job and create_span directly on the run.
The new SDK returns PipelineResource and PipelineRunResource wrappers around generated API models. Chaining is similar, but types and some method names differ.
Create a Pipeline
Legacy | New |
|---|
CreatePipeline
| CreatePipelineInputRequest
|
PipelineMetadata
| Meta (acceldata.models.api.pipeline.meta.Meta)
|
client.create_pipeline(CreatePipeline(...)) → Pipeline
| client.create_pipeline(CreatePipelineInputRequest(...)) → PipelineResource
|
Before:
from acceldata_sdk.models.pipeline import CreatePipeline, PipelineMetadata
pipeline = client.create_pipeline(
CreatePipeline(
uid="my_pipeline",
name="My pipeline",
meta=PipelineMetadata(owner="team-a", team="data", codeLocation="..."),
)
)
After:
from acceldata.models.api.pipeline.meta import Meta
from acceldata.models.sdk.pipeline.create_pipeline_input_request import CreatePipelineInputRequest
pipeline = client.create_pipeline(
CreatePipelineInputRequest(
uid="my_pipeline",
name="My pipeline",
meta=Meta(owner="team-a", team="data", code_location="..."),
)
)
# Inspect API-shaped data:
print(pipeline.to_dict())
CreatePipelineInputRequest accepts both Meta with code_location and legacy-style objects that expose codeLocation; the SDK normalizes either form.
Load and List Pipelines
Legacy | New |
|---|
client.get_pipeline(uid) → Pipeline
| client.get_pipeline(uid) → PipelineResource
|
client.get_pipelines()
| client.get_pipelines() → PipelinesListingResponse
|
— | client.get_pipeline_res(uid)
|
— | client.delete_pipeline(pipeline_id)
|
— | client.update_pipeline(pipeline)
|
— | client.replace_pipeline_tags(identity, tags)
|
Pipeline Runs
Legacy | New |
|---|
pipeline.create_pipeline_run(...) on Pipeline
| pipeline.create_pipeline_run(...) on PipelineResource → PipelineRunResource
|
client.get_pipeline_run(pipeline_run_id=..., continuation_id=..., pipeline_id=...)
| Same keyword-only lookup on AdocClient; returns PipelineRunResource |
run.create_job(CreateJob(...))
| run.create_job(CreateJobInput(...)) on PipelineRunResource
|
run.create_span(...), run.get_root_span()
| run.create_root_span(), run.get_root_span(), SpanResource helpers
|
client.get_spans(pipeline_run_id)
| client.get_spans(pipeline_run_id) → SpansResponse
|
— | client.get_span(pipeline_run_id, span_identity)
|
— | client.create_span(...), client.get_child_spans(...)
|
Continuation IDs for multi-stage workflows are unchanged in semantics.
Jobs and Lineage References
Legacy | New |
|---|
CreateJob
| CreateJobInput
|
Node(asset_uid="DS.table") or Node(job_uid="...")
| JobInputOutputRef(asset_uid="DS.table") or JobInputOutputRef(job_uid="...")
|
JobMetadata
| Meta
|
Before:
from acceldata_sdk.models.job import CreateJob, Node, JobMetadata
run.create_job(
CreateJob(
uid="extract_job",
name="Extract",
inputs=[Node(asset_uid="WAREHOUSE.db.schema.table")],
outputs=[Node(job_uid="transform_job")],
meta=JobMetadata(owner="etl", team="data", codeLocation="..."),
bounded_by_span=True,
span_uid="extract_span",
)
)
After:
from acceldata.models.api.pipeline.meta import Meta
from acceldata.models.sdk.pipeline import CreateJobInput, JobInputOutputRef
run.create_job(
CreateJobInput(
uid="extract_job",
name="Extract",
inputs=[JobInputOutputRef(asset_uid="WAREHOUSE.db.schema.table")],
outputs=[JobInputOutputRef(job_uid="transform_job")],
meta=Meta(owner="etl", team="data", code_location="..."),
bounded_by_span=True,
span_uid="extract_span",
)
)
Spans and Events
Legacy | New |
|---|
acceldata_sdk.models.span_context.SpanContext
| acceldata.models.sdk.pipeline.span_resource.SpanResource
|
acceldata_sdk.events.generic_event.GenericEvent
| acceldata.models.sdk.pipeline.events.GenericEvent
|
acceldata_sdk.events.log_events.LogEvent
| acceldata.models.sdk.pipeline.events.LogEvent
|
Step 5: Catalog — Datasources, Assets, Profiling
Datasources
Legacy | New |
|---|
client.get_datasource(name, properties=False)
| client.get_datasource(name, properties=False) → DatasourceResource
|
client.get_datasource_by_id(id, properties=False)
| client.get_datasource_by_id(id, properties=False) → DatasourceResource
|
client.get_datasources(type=...)
| client.get_datasources(type=...)
|
client.get_all_datasources()
| client.get_all_datasources() → list[DatasourceResource]
|
client.start_crawler(name)
| client.start_crawler(name)
|
client.get_crawler_status(name)
| client.get_crawler_status(name)
|
AssetSourceType moved to acceldata.models.sdk.catalog.asset_source_type.
Assets
Legacy | New |
|---|
client.get_asset(identifier) → asset object with methods
| client.get_asset(identifier) → AssetResource
|
asset.profile_asset(...), asset.sample_data() on model
| client.profile_asset(...), client.sample_data(...), or AssetResource methods
|
client.get_asset_types()
| client.get_asset_types() / client.get_all_asset_types()
|
client.get_profile_status(asset_id, req_id)
| client.get_profile_status(asset_id, req_id) → ProfileRequestResource
|
— | client.get_asset_tags, add_asset_tag, get_asset_labels, add_asset_labels, get_asset_metadata, add_custom_metadata
|
Step 6: Policies and Rule Execution
Most policy flows map one-to-one, but parameter names and execution scoping changed.
Legacy | New |
|---|
client.get_policy(type=PolicyType.DATA_QUALITY, identifier="...")
| client.get_policy(PolicyType.DATA_QUALITY, "..."), or typed get_dq_policy_resource / get_recon_policy_resource / get_cadence_policy_resource
|
client.list_all_policies(filter, page=..., size=...)
| client.list_all_policies(policy_filter=..., page=..., size=...)
|
client.policy_executions(identifier, RuleType.DATA_QUALITY, ...)
| Same; RuleType enum values differ (see below) |
Import paths:
# Legacy
from acceldata_sdk.constants import PolicyType, FailureStrategy, RuleExecutionStatus
from acceldata_sdk.models.ruleExecutionResult import PolicyFilter, RuleType
# New
from acceldata.models.sdk.catalog import PolicyType, PolicyFilter, RuleType, RuleExecutionStatus
from acceldata.models.sdk.catalog.executor import FailureStrategy
RuleType in the new SDK uses enum member names (for example, RuleType.DATA_QUALITY) for query parameters; legacy used wire strings such as 'DATA-QUALITY'. PolicyType wire values (DATA-QUALITY, RECONCILIATION, DATA_CADENCE) are unchanged for get_policy.
Execute a Policy
Legacy | New |
|---|
execute_policy(policy_type, policy_id, sync=..., incremental=..., failure_strategy=..., pipeline_run_id=..., policy_execution_request=...)
| execute_policy(rule_type, rule_id, policy_execution_request, *, sync=..., failure_strategy=..., pipeline_run_id=..., sleep_interval=..., total_retries=..., transient_retry=...)
|
incremental=True
| PolicyExecutionInput(executionType=PolicyExecutionType.INCREMENTAL)
|
incremental=False (full run)
| PolicyExecutionInput(executionType=PolicyExecutionType.FULL)
|
Optional policy_execution_request | Required policy_execution_request (use PolicyExecutionInput for typical cases) |
Returns execution handle / result inline when sync=True | Returns Executor; call executor.get_result() / get_status() when sync=False |
Before (full run, synchronous):
from acceldata_sdk.constants import PolicyType, FailureStrategy
result = client.execute_policy(
PolicyType.DATA_QUALITY,
policy_id=123,
sync=True,
incremental=False,
failure_strategy=FailureStrategy.FailOnError,
pipeline_run_id=run_id,
)
After (equivalent):
from acceldata.models.sdk.catalog import PolicyExecutionType, RuleType
from acceldata.models.sdk.catalog.policy_execution_request import PolicyExecutionInput
from acceldata.models.sdk.catalog.executor import FailureStrategy
executor = client.execute_policy(
RuleType.DATA_QUALITY,
123,
PolicyExecutionInput(executionType=PolicyExecutionType.FULL),
sync=True,
failure_strategy=FailureStrategy.FailOnError,
pipeline_run_id=run_id,
)
# When sync=True, executor already holds the terminal result; you can also call:
# result = executor.get_result()
Asynchronous execution:
executor = client.execute_policy(
RuleType.DATA_QUALITY,
123,
PolicyExecutionInput(executionType=PolicyExecutionType.FULL),
sync=False,
)
status = executor.get_status()
result = executor.get_result(failure_strategy=FailureStrategy.DoNotFail)
Status, Results, and Per-Type Helpers
Legacy | New |
|---|
get_policy_status(policy_type, execution_id)
| get_policy_execution_status(rule_type, execution_id)
|
get_policy_execution_result(policy_type, execution_id, failure_strategy=...)
| get_policy_execution_result(rule_type, execution_id, failure_strategy=...)
|
get_dq_rule_result / get_reconciliation_rule_result / get_freshness_rule_result → RuleResult
| Same method names; return ExecutionResult (typed API models) |
execute_dq_rule, execute_reconciliation_rule, execute_freshness_rule
| Still available on AdocClient; prefer unified execute_policy |
cancel_rule_execution, enable_rule, disable_rule
| Unchanged names |
Step 7: Pipeline Tags
Pipeline tag types moved to generated models:
from acceldata.models.api.pipeline.tag import Tag
Tag(name="env:prod", displayName="Environment: Production")
Removed or Not Exposed on AdocClient
The following legacy TorchClient methods are not on AdocClient. Migrate only if you still depend on them.
Legacy Method | Notes |
|---|
get_supported_sdk_versions()
| Removed. |
get_torch_version()
| Removed. |
do_version_check constructor flag
| Removed. |
get_property_templates()
| Was unimplemented in the legacy SDK, and remains unimplemented here. |
get_all_source_types()
| Not on the client; use asset or datasource type listing APIs. |
get_tags() (global tag list)
| Use asset tag APIs or pipeline tag replacement. |
get_analysis_pipeline(id)
| Available on client.generic_service.get_analysis_pipeline(pipeline_identifier) — accepts a numeric ID or name; returns AnalyticsPipeline. |
get_connection_types()
| Available on client.generic_service.get_connection_types(). |
create_connection(), check_connection()
| Deprecated; moved to the management service. |
Transient HTTP retries on policy executions are new in acceldata-sdk-python.
What's Next
After you complete this section, explore:
Migration Guide and New Features Overview – Review the support policy and the full migration checklist.
Acceldata SDK for Python (acceldata-sdk-python) – Review installation, client setup, and error handling in the new SDK.