Skip to main content

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​

OptionTypeDefaultDescription
--select, -sTEXTSelect syncs: name or glob (users_), tag:<pattern>, destination:<type>, state:modified/state:new, or "" / "all". Repeat to union.
--excludeTEXTSubtract syncs from the selection (same grammar as --select). Repeatable.
--statePATHBaseline manifest path for state:modified/state:new selectors (for example, a prior drt docs generate --format json CI artifact).
--failedBOOLEANRe-run only syncs whose last recorded status was not success (intersects with --select/--exclude). Never-run syncs are not included.
--limitINTEGERExtract at most N rows per sync — a sampled run for safe first sends. Watermarks do not advance; refused for mirror/replace syncs.
--varsTEXTOverride project vars for this run, e.g. --vars 'lookback_days: 1, tag: crm'. Takes precedence over DRT_VAR_* and drt_project.yml vars:.
--fail-fastBOOLEANStop scheduling syncs after the first failure; in-flight syncs finish, remaining ones are reported as skipped.
--threads, -tINTEGER1Parallel execution threads.
--dry-runBOOLEANPreview without writing data.
--verboseBOOLEANShow row-level error details.
--quiet, -qBOOLEANSuppress output except errors. Wins over --verbose.
--output, -oTEXTtextOutput format: text or json.
--profile, -pTEXTOverride profile (default: drt_project.yml or DRT_PROFILE).
--manifest-pathPATHdbt manifest for contract.source: dbt (default: target/manifest.json).
--log-format[text|json]LogFormat.TEXTLog format: 'text' (default) or 'json' (structured JSON Lines, separate from --output json).
--cursor-valueTEXTOverride cursor/watermark value for incremental syncs (backfill/recovery).
--full-refreshBOOLEANClear 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-guardsBOOLEANProceed when a run-time max_deletes/max_delete_pct guard trips; record the override in run results and history.
--diffBOOLEANWhen 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-limitINTEGER20Maximum number of records to show per diff category (default 20).
--target-pathPATHtarget/drtDirectory 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.