Runtime Variables
dq_persist_results
- Type: boolean
- Default:
false
Controls whether history tables accumulate rows across runs.
| Value | Behavior |
|---|---|
false | History models emit zero rows. Only current-run summaries are built. |
true | History models upsert current-run results, building a time series across official runs. |
dq_run_id
- Type: string
- Default: dbt
invocation_id
Identifier stamped on every output row. Use a meaningful value for official runs so history is easy to query and correlate.
--vars '{dq_run_id: "official_2026_03"}'
If not set, defaults to the dbt invocation ID (a UUID generated per run).
tuva_last_run
- Type: timestamp string (
YYYY-MM-DD HH:MM:SS) - Default:
run_started_at
Timestamp stamped on output rows as run_ts. Use this when you want the run timestamp to reflect when the source data was produced rather than when dbt executed.
--vars '{tuva_last_run: "2026-03-01 00:00:00"}'
Examples
Current-run only (dev/test):
dbt run -s tag:spotlight
Persist to history with auto-generated metadata:
dbt run -s tag:spotlight --vars '{dq_persist_results: true}'
Persist with explicit run ID and timestamp:
dbt run -s tag:spotlight --vars '{dq_persist_results: true, dq_run_id: "official_2026_03", tuva_last_run: "2026-03-01 00:00:00"}'