The location of the dbt Core upgrade guides has changed, and they will soon be removed from
Guides. The new location is in the
Docs tab under
Available dbt versions. You have been redirected to the new URL, so please update any saved links and bookmarks.
dbt Core v0.21 has reached the end of critical support. No new patch versions will be released, and it will stop running in dbt Cloud on June 30, 2022. Read "About dbt Core versions" for more details.
dbt source snapshot-freshnesshas been renamed to
dbt source freshness. Its node selection logic is now consistent with other tasks. In order to check freshness for a specific source, you must prefix it with
- Snowflake: Turn off transactions and turn on
autocommitby default. Within dbt materializations, wrap DML statements in explicit
commit. Note that it is not recommended to run DML statements outside of dbt materialization logic. If you do this, despite our recommendation, you will need to wrap those statements in explicit
commit. Note also that this may affect user-space code that depends on transactions, such as pre-hooks and post-hooks that specify
transaction: false. We recommend removing those references to transactions.
New and changed documentation
build, rpc: Add
source: Renamed to
dbt source freshness.
dbt depslogging for outdated packages
--output-keysflag and RPC parameter
source: Updated selection logic to match other tasks. When selecting a specific source to check freshness, you must prefix it with
- Node selection syntax, commands: Switch
--selectacross the board. (Commands which previously used the
--modelsflag still support it for backwards compatibility.)
- YAML selectors now support an optional
defaultproperty. If set, dbt will use custom selection criteria for commands that do not specify their own selection/exclusion flags.
- Selection methods and state comparison caveats: Add
state:modifiedsubselectors, and reflect that it now includes changes to upstream macros.
- Test selection examples includes more discussion of indirect selection (a change in v0.20), and the optional "greedy" flag/property (new in v0.21), which you can optionally set to include tests that have a mix of selected + unselected parents
Elsewhere in Core
- Resource configs and properties docs have been consolidated and reconciled. New
configproperty that makes it possible to configure models, seeds, snapshots, and tests in all YAML files.
- Configuring incremental models: New optional configuration for incremental models,
- Environment variables: Add a log-scrubbing prefix,
whereconfig has been reimplemented as a macro (
get_where_subquery) that you can optionally reimplement, too
dispatchnow supports reimplementing global macros residing in the
dbtmacro namespace with versions from installed packages, by leveraging
- Postgres profile property
connect_timeoutnow configurable. Also applicable to child plugins (e.g.
- Redshift: profile property
ra3_node: trueto support cross-database source definitions and read-only querying
- BigQuery: profile property
execution_projectnow configurable. Snapshots support