Skip to content
Back to skills

Dbt Knowledge Patch

ASecurity

dbt Core

  • 25 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
developmentjavascriptpythongojavabashsqlnodeexpresstestingdatabase

Works with

  • cli

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill dbt-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dbt Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dbt Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-dbt-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-dbt-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dbt-knowledge-patch
description: dbt Core
version: "1.12.0"
license: MIT
metadata:
  author: Nevaberry
---


# dbt Knowledge Patch

Load this skill for dbt configuration migrations, testing and state selection,
microbatch builds, snapshots and freshness, managed functions, Semantic Layer
configuration, CLI artifacts, and external parser integration. The references
retain the product and adapter distinctions for Core, Fusion, and dbt v2.

## Reference index

| Reference | Topics |
| --- | --- |
| [Behavior flags and migrations](references/behavior-flags-and-migrations.md) | Changed defaults, deprecations, validation, warnings, resource names, macro precedence, adapter flags |
| [CLI, artifacts, and runtime](references/cli-artifacts-and-runtime.md) | Inline SQL, operations, logs, telemetry, manifests, external parser, docs, dependencies, environment variables |
| [Incremental models, snapshots, and freshness](references/incremental-snapshots-and-freshness.md) | Microbatch configuration, filtering, retries, hard deletes, source and model freshness, sampling |
| [Managed functions](references/managed-functions.md) | UDF platforms, body files, arguments, Python and JavaScript, overloads, testing, deferral |
| [Project configuration and Semantic Layer](references/project-config-and-semantic-layer.md) | Variables, metadata, constraints, versions, semantics, catalogs, packages, warehouse profiles, seeds |
| [Testing, selection, and state](references/testing-selection-and-state.md) | Test arguments, unit fixtures, partial parsing, selectors, state comparison, dbt State |

## Breaking changes and deprecations

Replace the deprecated selection aliases `--models`, `--model`, and `-m` with
`--select`. The `--output` and `-o` options for `dbt source freshness` are also
deprecated. Source `overrides` is deprecated from 1.10.4, and
`modules.itertools` is deprecated from 1.10.6.

From 1.10.5, top-level generic test arguments are deprecated. 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]
```

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, source and semantic model names containing spaces
warn by default; `require_source_and_semantic_model_names_without_spaces`
opts into an error for those names.

Core 1.12.0 defaults `skip_nodes_if_on_run_start_fails`,
`state_modified_compare_more_unrendered_values`,
`require_all_warnings_handled_by_warn_error`, and `validate_macro_args` to
`true`. With hook skipping enabled, dbt skips node execution when an
`on-run-start` hook fails. `on-run-end` receives `results` without hook results.

Core 1.12.0 also defaults `require_batched_execution_for_custom_microbatch_strategy`
and `require_nested_cumulative_type_params` to `true`. Custom microbatch
strategies execute in batches; legacy cumulative metrics with unnested
parameters can fail to parse. Enabling `require_yaml_configuration_for_mf_time_spines`,
also defaulted to `true`, suppresses a time-spine deprecation warning.

Set a behavior flag explicitly to `false` under `flags` in `dbt_project.yml`
to retain legacy behavior after its default becomes `true`; this opt-out can
still emit deprecation warnings. Core 2.0 makes several behaviors permanent;
the behavior reference names the affected switches.

Use `error` and `warn` in `--warn-error-options` instead of deprecated `include`
and `exclude`. Set `silence` under `flags.warn_error_options` to suppress specific
warning events. `dbt parse --show-all-deprecations` reports each occurrence;
deprecation messages include the event name and a summary prints by default.

In dbt 2.0.11, use `--state-mode`; `--run-cache-mode` still works with a
deprecation warning. Put behavior and adapter flags in the root
`dbt_project.yml`; installed packages' `flags:` are ignored.

## Microbatch configuration and 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 the start
before the end. `event_time`, `begin`, and both bounds are interpreted as UTC.
Both bounds can select the historical batches rebuilt by `--full-refresh`:

```bash
dbt run --select events --full-refresh --event-time-start 2024-01-01 --event-time-end 2024-02-01
```

Direct `ref()` and `source()` inputs declaring `event_time` are filtered on
their own time columns, including the batch start and excluding the batch end.
Use `{{ ref('upstream_model').render() }}` to read the whole relation for that
reference. Pre-hooks run on the first batch and post-hooks on the last;
Jinja can read the active batch through `model.batch`.

Set `concurrent_batches: true` to request parallel execution over automatic
detection, or `false` for sequential execution. `dbt retry` reprocesses only
failed microbatches. From 1.10.20, retry recalculates windows using the original
invocation time. A `PartialSuccess` result exits nonzero from 1.9.1.

With `dbt-postgres`, set `unique_key`; with `dbt-spark` or `dbt-bigquery`, set
`partition_by`. Snowflake and Redshift use `delete+insert` for microbatch writes;
Databricks uses `replace_where`. In dbt 2.0.11, a concurrent batch failure
cancels that model's batches that have yet to start.

## Snapshots, freshness, and sampled builds

`dbt-postgres`, `dbt-bigquery`, `dbt-snowflake`, and `dbt-redshift` support
`hard_deletes`. Enabling it on an existing snapshot requires manual table
migration and removing legacy `invalidate_hard_deletes` settings.

Source freshness can live under `config.freshness` from 1.9.5. From 1.9.6,
explicit `null` at table level disables inherited freshness. `loaded_at_query`
returns a single freshness timestamp from SQL; from 1.10.3 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. Core 1.12.7 checks selected sources individually when a batched
metadata freshness check fails.

Set a model's adaptive build interval under `config.freshness.build_after`
with both `count` and `period`. For update-driven builds in Core 1.11, set
`config.freshness.build_after.updates_on` and omit `count` and `period`.
Model freshness without `build_after` is skipped; move legacy top-level model
`freshness` into `config` when upgrading.

`dbt build --sample "3 days"` builds against a recent time window. Sampling can
include referenced seeds, dependency snapshots, and inputs to snapshots.

## Testing and state selection

Select a unit test with `dbt test --select unit_test:order_totals`, or use
`dbt test --resource-type unit_test`. Disabling a model also disables its unit
tests. An empty field in a CSV fixture is SQL `NULL`; unit fixture rendering
for `ref()` and `source()` ignores `--empty`.

Unit fixture inputs can name a model version with `ref('orders', version=1)`.
Separate `source()` expressions distinguish fixtures for identically named
tables in different sources. Enable `support_custom_ref_kwargs` for custom
`ref()` keyword arguments in unit and generic data tests.

`dbt build --select 'selector:nightly,tag:critical'` intersects a named selector
with a tag. In Core 1.11.16 and 1.12.6, a bare wildcard such as `f_*` matches
model names at any subfolder depth.

With `state_modified_compare_more_unrendered_values` enabled, `state:modified`
compares unrendered configs and source `database` and `schema` properties;
different Jinja rendering alone does not mark those values modified.
Renaming or removing a contracted model can raise a breaking-change warning
or error. With `--state`, a reference to a removed test raises an exception.

## Managed SQL, Python, and JavaScript functions

Core creates SQL and Python UDFs as `function` nodes. Call a managed function
with `{{ function('add_one') }}(order_id)` and use `ref()` inside a SQL function
to reference a model. Body filenames in `functions/` match the function's
properties YAML `name`; declare `arguments[].data_type` and `returns.data_type`.

SQL bodies use expressions on BigQuery, Snowflake, and Databricks, and queries
on Redshift and Postgres. dbt expands project macros and resolves `var()` before
the warehouse evaluates the stored SQL with the function's arguments.

Snowflake and BigQuery Python UDFs require `config.runtime_version` and
`config.entry_point`; optional dependencies go in `config.packages`.
Databricks requires Unity Catalog, evaluates the Python body verbatim, and
requires a top-level `return`; runtime and entry-point settings warn and have
no effect there. Core 1.12+ supports JavaScript UDFs on Snowflake and BigQuery;
other adapters reject them at parse time.

A UDF called by a model unit test must already exist in the warehouse.
`dbt build --select "+my_model_to_test" --empty` prepares the function and other
ancestors. Functions are exempt from `--empty` and `event_time` filtering.
The function reference details overload support, warehouse-specific volatility,
argument defaults, deferral, and retrying failed signatures.

## Project variables, metadata, semantics, and catalogs

Declare variables in `vars.yml` and read them with `var()`. Core loads `.env`
variables, such as `REPORTING_SCHEMA=analytics`, for `env_var('REPORTING_SCHEMA')`.
From 1.10.18, `config.meta_get('owner')` reads custom metadata and
`config.meta_require('owner')` requires the key and returns its value.

Semantic Layer v2 YAML supports `semantic_model` on models, column dimensions
and entities, `derived_semantics`, and metrics on models or separately.
Column dimensions and entities default to the column name and can expose a
different semantic name while querying that column.

Set `flags: {use_catalogs_v2: true}` in `dbt_project.yml` to opt into Core's v2
`catalogs.yml` handling; the adapter supplies the implementation. In a v1 write
integration, `catalog_database: analytics` overrides the relation database with
highest priority in `generate_database_name`.

## External parser and artifact consumers

`dbt parse --use-v2-parser` loads the external parser's manifest. The default
command is `dbt-core-experimental-parser parse`; override it with `--v2-parser`
or `DBT_ENGINE_V2_PARSER`. Core 1.12.7 requires
`dbt-core-experimental-parser>=2.0.11` for this integration.

From Core 1.12.1, the installed adapter determines the adapter macros Core runs
after reading the external manifest. Core 1.12.4 includes those macros in
`target/manifest.json`; Core 1.12.6 persists `compiled_code` for compiled nodes.
Core 1.12.6 requests `--log-format otel`, preserves parser warning and error
codes, and filters span records. A stray stderr line alone is nonfatal under
`--warn-error`.

Result consumers can receive `Reused` in `NodeStatus` and `RunStatus`, and a
child result alongside a parent error. Core 1.12.7 exposes `state_decision_id`
on `RunResult`. Core 1.12.4 exposes `otel_trace_id()` and `otel_span_id()` in
Jinja for correlating warehouse queries with traces and spans.

Files in this skill

  • SKILL.md8.1 KB
  • coverage.json1 KB
  • references/behavior-flags-and-migrations.md5.2 KB
  • references/cli-artifacts-and-runtime.md4.7 KB
  • references/incremental-snapshots-and-freshness.md3.8 KB
  • references/managed-functions.md4.3 KB
  • references/project-config-and-semantic-layer.md4.2 KB
  • references/testing-selection-and-state.md3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.