Skip to main content

Set Primary Keys

POST 

/v1/datasets/:dataset_id/set-primary-keys

Set primary keys on an Iceberg dataset and trigger compaction to enforce uniqueness.

This will:

  1. Validate pk_columns exist in the dataset schema
  2. Acquire an exclusive lock on the dataset
  3. Dispatch an async DATASET_COMPACT_PK event
  4. Return immediately with jobId and status="queued"

The actual deduplication runs asynchronously. Poll processingStatus to track progress. Returns 409 if the dataset is already locked/processing.

Request

Responses

Successful Response