Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Dbt Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-dbt-knowledge-patch-nevaberry-plugins)
---
name: dbt-knowledge-patch
description: dbt Core
version: "1.12.0"
license: MIT
metadata:
author: Nevaberry
---
# dbt knowledge patch
Load this skill when migrating dbt configuration, selecting resources, running
incremental models and tests, defining managed functions, or consuming artifacts.
Use the references for complete guidance and examples. Individual entries retain
the product, adapter, and version conditions that govern their behavior.
## Reference index
| Reference | Topics |
| --- | --- |
| [CLI, selection, state, and automation](references/cli-selection-state-and-automation.md) | Selection, inline SQL, operations, State, results, docs, login |
| [Configuration, validation, and parsing](references/configuration-validation-and-parsing.md) | Behavior flags, names, warnings, variables, cached parsing, external parser, macros |
| [Execution, incremental models, and freshness](references/execution-incremental-and-freshness.md) | Microbatch bounds, filtering, retries, hooks, source and model freshness, sampling |
| [Resources, tests, snapshots, and functions](references/resources-tests-and-functions.md) | Contracts, references, model versions, snapshots, seeds, fixtures, UDFs |
| [Runtime, adapters, and packages](references/runtime-adapters-and-packages.md) | Python and dependency requirements, package installation, catalogs, adapter settings |
| [Semantic metadata and artifacts](references/semantic-metadata-and-artifacts.md) | Resource metadata, metrics, time spines, saved queries, artifacts, logs, OpenTelemetry |
## Breaking changes and deprecations
### CLI and warning configuration
- Replace deprecated `--models`, `--model`, and `-m` with `--select`.
- The `--output` and `-o` options for `dbt source freshness` are deprecated.
- Use `error` and `warn` in `--warn-error-options` in place of deprecated
`include` and `exclude`. Use `flags.warn_error_options.silence` to suppress
specific warning events.
- Run `dbt parse --show-all-deprecations` to see each occurrence. Deprecation
messages include the warning event name; dbt prints a summary by default.
- In dbt 2.0.11, use `--state-mode`; `--run-cache-mode` still works with a
deprecation warning.
### Configuration placement and resource names
- Missing `+` prefixes on project configuration keys emit
`MissingPlusPrefixDeprecation` from 1.10.5. From 1.10.7,
`PropertyMovedToConfigDeprecation` identifies node config keys that belong
under `config`.
- Source `overrides` is deprecated from 1.10.4; `modules.itertools` is
deprecated from 1.10.6.
- Resource names containing spaces are rejected by default in Core 1.10.
Rename them or set `flags.require_resource_names_without_spaces: false`
during migration. In Core 1.12.0, sources and semantic models instead warn
by default; `require_source_and_semantic_model_names_without_spaces`
opts into an error for those names.
- In dbt 2.0.11, set behavior and adapter flags in the root `dbt_project.yml`;
flags in installed packages' project files are ignored.
### Behavior flag defaults and removals
Core 1.12.0 defaults these flags to `true`:
- `skip_nodes_if_on_run_start_fails`
- `state_modified_compare_more_unrendered_values`
- `require_all_warnings_handled_by_warn_error`
- `validate_macro_args`
- `require_batched_execution_for_custom_microbatch_strategy`
- `require_nested_cumulative_type_params`
- `require_yaml_configuration_for_mf_time_spines`
Unnested cumulative metric parameters can fail to parse. Enabling
`require_yaml_configuration_for_mf_time_spines` suppresses a time-spine
deprecation warning. Setting a behavior flag explicitly to `false` after its
default changes preserves legacy behavior, but can still emit deprecation warnings.
Core 2.0 makes several behaviors permanent; consult the configuration reference
for the exact switches removed and the separate platform rollout date.
### Generic data test arguments
Top-level test arguments are deprecated from 1.10.5. From 1.10.8,
`require_generic_test_arguments_property` defaults to `true`, and keys under
`arguments` are passed as keyword arguments to the test.
```yaml
models:
- name: orders
columns:
- name: status
data_tests:
- accepted_values:
arguments:
values: [paid, shipped]
```
Core 1.9.0 accepts `tests:` as an alias for `data_tests:` without the alias's
deprecation warning. Disabling a model also disables its unit tests in Core 1.11.
### Snapshot and runtime migration
When enabling `hard_deletes` on an existing snapshot, migrate the snapshot table
manually and remove legacy `invalidate_hard_deletes`. Supported adapters are
`dbt-postgres`, `dbt-bigquery`, `dbt-snowflake`, and `dbt-redshift`.
Core 1.11 requires Python 3.10 or later. Core 1.12 adds Python 3.14 support,
requires `dbt-adapters>=1.24.5`, and directly depends on MetricFlow in place of
`dbt-semantic-interfaces`. Detailed dependency constraints are in the runtime reference.
## Microbatch execution
Initial and full-refresh builds start at `begin`. `batch_size` accepts `hour`,
`day`, `month`, or `year`. `lookback` reprocesses batches before the latest
bookmark for late-arriving data and defaults to `1`.
```yaml
models:
- name: events
config:
materialized: incremental
incremental_strategy: microbatch
event_time: occurred_at
begin: '2024-12-01'
batch_size: hour
lookback: 2
```
Supply `--event-time-start` and `--event-time-end` together, with start before
end; supply both with `--full-refresh` to choose historical batches to rebuild.
`event_time`, `begin`, and both bounds are interpreted as UTC.
- Direct `ref()` and `source()` inputs declaring `event_time` are filtered on
their own time columns, including batch start and excluding batch end.
- Use `{{ ref('upstream_model').render() }}` to read the whole relation for that reference.
- `concurrent_batches: true` requests parallel execution; `false` runs sequentially.
- Model pre-hooks run on the first batch and post-hooks on the last; Jinja can
read the active batch through `model.batch`.
- `dbt retry` reprocesses only failed batches. From 1.10.20, it recalculates
windows using the original invocation time.
- From 1.9.1, `PartialSuccess` gives a nonzero invocation exit status.
- In dbt 2.0.11, a concurrent microbatch failure cancels that model's batches
that have yet to start.
## Freshness and hooks
Source freshness can be set under `config.freshness` from 1.9.5; explicit
table-level `null` disables inherited freshness from 1.9.6. `loaded_at_query`
returns a single freshness timestamp from SQL; from 1.10.3, both it and
`loaded_at_field` can go under source or table `config`.
`dbt source freshness` runs project start and end hooks by default in Core 1.10.
Set `flags.source_freshness_run_project_hooks: false` to restore the previous
behavior. With `skip_nodes_if_on_run_start_fails` enabled, a failed
`on-run-start` skips node execution. The `results` exposed to `on-run-end`
omit hook results.
A model's adaptive build interval goes under `config.freshness.build_after`
and requires `count` and `period`. For update-driven builds in Core 1.11,
set `config.freshness.build_after.updates_on` and omit `count` and `period`.
dbt skips model freshness definitions that omit `build_after`; move legacy
top-level model `freshness` into `config` when upgrading.
## Selection, state, and scripts
```sh
dbt test --select unit_test:order_totals
dbt test --resource-type unit_test
dbt ls --resource-type model --output json --output-keys name config.materialized
dbt build --select 'selector:nightly,tag:critical'
dbt --quiet show --inline "select 1 as id" --output json
```
`selector:<name>` composes named selectors with other methods in Core 1.12;
the example intersects `nightly` with `critical`. Quiet mode provides parseable
text and JSON for `dbt show` and `dbt compile`.
`state_modified_compare_more_unrendered_values` compares unrendered configs and
source `database` and `schema` properties, so a different Jinja rendering alone
does not mark those values modified. Renaming or removing a contracted model
can raise a breaking-change warning or error during state comparison.
With `--state`, a reference to a removed test raises an exception in Core 1.12.0.
Execution consumers can receive `Reused` in `NodeStatus` and `RunStatus`.
A child can continue running after its parent errors, so consumers can receive
a child result alongside the parent error.
## Managed functions and unit tests
Core creates SQL and Python UDFs as `function` nodes during DAG execution.
Call one with `{{ function('add_one') }}(order_id)`; a SQL function can use `ref()`.
Put bodies in `functions/` with filename stems matching function names in YAML.
Define types with `arguments[].data_type` and `returns.data_type`; function
`type` belongs under `config`.
SQL body form, Python handlers and runtimes, volatility, defaults, and supported
languages depend on the adapter; use the resources reference for those details.
Core 1.12+ supports JavaScript UDFs on Snowflake and BigQuery and function
overloads on the documented adapters. Overloads build as a single DAG node;
`dbt retry` reruns only failed signatures.
A model unit test calling a UDF requires the function to exist in the warehouse
before the test runs. Build the function and other ancestors with `--empty`:
```sh
dbt build --select "+my_model_to_test" --empty
```
Functions are exempt from `--empty` and `event_time` filtering. Empty CSV fixture
fields become SQL `NULL`; unit-test fixture rendering for `ref()` and `source()`
ignores `--empty`.
## Project configuration, semantics, and artifacts
Core 1.12 reads project variables from `vars.yml` through `var()` and loads
environment variables from `.env`. Opt into v2 `catalogs.yml` with
`flags: {use_catalogs_v2: true}`; the adapter supplies its implementation.
Use `dbt parse --use-v2-parser` to load the external parser's manifest. The default
command is `dbt-core-experimental-parser parse`; override it with `--v2-parser`
or `DBT_ENGINE_V2_PARSER`. From Core 1.12.1, the installed adapter determines
the adapter macros Core runs after loading that manifest. Consult the parsing
reference for parser minimums, environment handling, logs, and persisted fields.
Semantic Layer v2 YAML supports `semantic_model` on models, column-level
dimensions and entities, `derived_semantics`, and model-level or separate metrics.
The semantic reference covers metric filters, custom time grains, OSI documents,
manifest fields, and artifact uploads.
From Core 1.12.4, use `otel_trace_id()` and `otel_span_id()` in Jinja query comments
or model SQL to correlate warehouse queries with OpenTelemetry traces and spans.