# Replace a dataset table promotion policy

**PUT** `/v1/datasets/{id}/tables/{tableKey}/promotion`

**Operation ID**: `putTablePromotion`
**Summary**: Replace a dataset table promotion policy
Validates and stores the complete promotion policy on the table. Newly included tag columns, and the columns of exact attribute includes the attribute cap has room for, are added synchronously before the request returns, in the same commit as the policy. Send back the revision the policy was read at to be refused rather than overwrite a change made since; omit it to replace whatever is stored.

## Tags
- Datasets
## Parameters

- **id** (required) - path
  - Type: string
- **tableKey** (required) - path
  - Type: string

## Request Body

The complete promotion policy document. It is decoded by the same strict codec that reads the stored policy: every field is typed exactly, no unknown field is accepted at any depth, and no value is coerced. It replaces the stored policy rather than patching it, and both groups are required -- a body that omits "tags" or "attributes" is rejected, not read as a request to stop discovery for that group. The cap is the switch: send a group with "cap": 0 to stop it promoting fields it has not seen before, which for attributes includes the paths it includes. That does not blank the group -- the columns the table already carries keep being written. A field is stopped by naming it in that group's exclude list, or, for attributes, by setting "excludeAllByDefault", which stops every path the include list does not cover. Read the current policy and send it back whole, changing only what you mean to change.

**Content-Type**: `application/json`

**Schema**: `PromotionPolicy`

## Responses

### 200

The persisted promotion policy.

- **Content-Type**: `application/json` / `PromotionPolicy`
### 400

Invalid promotion policy.

### 404

Dataset or table not found.

### 409

The policy changed since the revision the request was made against; read it again and reapply the change. Or the table kept changing under the request, which a running writer's own evolution can cause; retry.
