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:
- Validate pk_columns exist in the dataset schema
- Acquire an exclusive lock on the dataset
- Dispatch an async DATASET_COMPACT_PK event
- 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
- 200
- 404
- 422
Successful Response
Not found
Validation Error