Skip to content
SupportLogin

Combine multiple Datasets into a single new merged Dataset

datasets.combine.create(CombineCreateParams**kwargs) -> CombineCreateResponse
POST/api/v1/datasets/combine

Requires an Idempotency-Key header to dedupe double-submits. Returns the merged Dataset synchronously by default. When async combine is enabled, clients may send Prefer: respond-async to receive a background job handle.

ParametersExpand Collapse
dataset_ids: Sequence[str]

Source Dataset IDs to combine. Must all belong to the caller’s org and be in a combinable state.

name: str

User-supplied name for the merged Dataset. Surfaced in the dataset list.

ReturnsExpand Collapse
One of the following:
class CombineResponseDto:
dataset_id: str

The newly created merged Dataset’s ID. Returns existing ID on idempotent replay.

class CombineJobResponseDto:
combine_job_id: str

Background combine job ID. Poll the combine job status endpoint until it succeeds or fails.

status: Literal["queued", "running", "succeeded", "failed"]

Current background combine job status.

One of the following:
"queued"
"running"
"succeeded"
"failed"
dataset_id: Optional[object]

The merged Dataset ID. Null until the background combine succeeds.

error_message: Optional[object]

Customer-safe failure message when the background combine fails.

Combine multiple Datasets into a single new merged Dataset

import os
from adaption import Adaption

client = Adaption(
    api_key=os.environ.get("ADAPTION_API_KEY"),  # This is the default and can be omitted
)
combine = client.datasets.combine.create(
    dataset_ids=["string", "string"],
    name="name",
)
print(combine)
{
  "dataset_id": "dataset_id"
}
Returns Examples
{
  "dataset_id": "dataset_id"
}