drt run
Run sync(s) defined in the project.
Without --select, runs all syncs sequentially (existing behaviour). --select accepts a sync name or glob, tag:<pattern>, destination:<type>, or "*" / "all"; repeat --select to union, --exclude to subtract (#771). Use --threads N for parallel execution. Use --dry-run --diff to preview record-level changes (#413).
Examples:
drt run
drt run --select post_users
drt run --select 'users_*' --exclude users_backfill
drt run --select tag:crm --select tag:ads --threads 4
drt run --select destination:hubspot
drt run --select state:modified --state ci-baseline/manifest.json --dry-run --diff
drt run --failed
drt run --dry-run --diff
Usage
drt run [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--select, -s | TEXT | Select syncs: name or glob (users_), tag:<pattern>, destination:<type>, state:modified/state:new, or "" / "all". Repeat to union. | |
--exclude | TEXT | Subtract syncs from the selection (same grammar as --select). Repeatable. | |
--state | PATH | Baseline manifest path for state:modified/state:new selectors (for example, a prior drt docs generate --format json CI artifact). | |
--failed | BOOLEAN | Re-run only syncs whose last recorded status was not success (intersects with --select/--exclude). Never-run syncs are not included. | |
--limit | INTEGER | Extract at most N rows per sync — a sampled run for safe first sends. Watermarks do not advance; refused for mirror/replace syncs. | |
--vars | TEXT | Override project vars for this run, e.g. --vars 'lookback_days: 1, tag: crm'. Takes precedence over DRT_VAR_* and drt_project.yml vars:. | |
--fail-fast | BOOLEAN | Stop scheduling syncs after the first failure; in-flight syncs finish, remaining ones are reported as skipped. | |
--threads, -t | INTEGER | 1 | Parallel execution threads. |
--dry-run | BOOLEAN | Preview without writing data. | |
--verbose | BOOLEAN | Show row-level error details. | |
--quiet, -q | BOOLEAN | Suppress output except errors. Wins over --verbose. | |
--output, -o | TEXT | text | Output format: text or json. |
--profile, -p | TEXT | Override profile (default: drt_project.yml or DRT_PROFILE). | |
--manifest-path | PATH | dbt manifest for contract.source: dbt (default: target/manifest.json). | |
--log-format | [text|json] | LogFormat.TEXT | Log format: 'text' (default) or 'json' (structured JSON Lines, separate from --output json). |
--cursor-value | TEXT | Override cursor/watermark value for incremental syncs (backfill/recovery). | |
--full-refresh | BOOLEAN | Clear the stored watermark first, so this run re-reads everything and then persists a fresh watermark. Does NOT reset tracked-mirror state — use drt state reset --tracked-mirror for that. | |
--force-guards | BOOLEAN | Proceed when a run-time max_deletes/max_delete_pct guard trips; record the override in run results and history. | |
--diff | BOOLEAN | When combined with --dry-run, show record-level diff (added/updated/deleted) for queryable destinations or a sample of records to send for non-queryable destinations. | |
--diff-limit | INTEGER | 20 | Maximum number of records to show per diff category (default 20). |
--target-path | PATH | target/drt | Directory to write run_results.json into (#778). Defaults to target/drt, not dbt's own target/, so a co-located dbt run && drt run (docs/guides/using-with-dbt.md) doesn't clobber dbt's own target/run_results.json. Written independent of --output for every invocation that resolves a sync list, including no-op runs (nothing selected/changed/failed) -- not written for preflight failures (bad project/profile/vars) before syncs are known. |