drt apply
Apply a plan only if recomputing it gives the same change set.
Nothing is written when the plan is stale, edited, from another drt major
version, already applied, or when the world drifted since it was made.
The write itself is the normal drt run path (rate limiting, DLQ,
history, watermarks, alerts).
A directory applies each plan in file-name order and stops at the first one that is refused or fails; the plans before it stay applied.
Examples:
drt plan orders_to_pg --out plan.json
drt apply plan.json
drt apply plan.json --auto-approve --max-age 2h # in CI
drt apply plans/ --auto-approve # every plan from `drt plan --all`
Usage
drt apply [OPTIONS] PLAN_FILE
Arguments
| Argument | Required | Description |
|---|---|---|
PLAN_FILE | yes | plan.json written by drt plan --out, or a directory of them (drt plan --all), applied in file-name order. |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--auto-approve | BOOLEAN | Do not prompt (required without a terminal, e.g. CI). | |
--approved-by | TEXT | Who approved this apply; recorded in the run results and the plan's claim. | |
--max-age | TEXT | 24h | Refuse a plan older than this (30m, 24h, 7d). |
--allow-drift-pct | FLOAT | 0.0 | Proceed if at most this percent of the planned keys drifted (logged). Default 0. |
--force-guards | BOOLEAN | Apply even though a sync.guards limit trips (recorded in the run results). | |
--exact | BOOLEAN | Replay the plan's encrypted .payload rows instead of extracting the source. | |
--keep-payload | BOOLEAN | Retain the encrypted sidecar after a successful --exact apply. | |
--cursor-value | TEXT | The cursor override the plan was made with (drt plan --cursor-value). | |
--output, -o | TEXT | text | Output format: text or json. |
--vars | TEXT | Override project vars, as for drt run. | |
--profile, -p | TEXT | Override profile. | |
--manifest-path | PATH | dbt manifest for contract.source: dbt (default: target/manifest.json). |