Upgrading to v0.20
dbt Core v0.20 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.
- Schema test macros are now
testblocks, which we're going to start calling "generic tests." There is backwards compatibility for schema test macros prefixed
test_, and you can still use them without switching to test blocks (though we hope you will soon!). The biggest breaking change is that all tests now return a set of failing rows, rather than a single numeric value. This resolved a longstanding inconsistency between schema tests and data tests.
- For package maintainers (and some users): The syntax for
adapter.dispatch()has changed; see linked documentation below.
- For adapter plugin maintainers: Macro dispatch now includes "parent" adapter implementations before using the default implementation. If you maintain an adapter plugin that inherits from another adapter (e.g.
adapter.dispatch()will now look for prefixed macros in the following order:
- For artifact users: The manifest and run_results now use a v2 schema. What changed: there are a handful of new properties in the manifest; the number of failures for a test has been moved to a new property
failures, so that
messagecan be the human-readable failure message.
New and changed documentation
- Building a dbt Project: tests
- Test Configs
- Test properties
- Node Selection (with updated test selection examples)
- Writing custom generic tests
Elsewhere in Core
- Parsing: rework of partial parsing, introduction of experimental parser
- The graph Jinja context variable includes
- Packages can now be installed from git with a specific commit hash as the revision, or via sparse checkout if the dbt project is located in a
- adapter.dispatch supports new arguments, a new project-level config, and includes parent adapters when searching for macro implementations.
- Exposures support
- New partition-related BigQuery configs:
- On BigQuery, dbt can now add query comment items as job labels
- Snowflake and BigQuery incremental models using the
mergestrategy accept a new optional config,
- Postgres configs now include first-class support for