Releases: dbt-labs/dbt-core
Releases · dbt-labs/dbt-core
dbt Core 1.0.0b2
An second beta release for v1.0.0.
Breaking changes
- Enable
on-run-startandon-run-endhooks fordbt test. Addflags.WHICHto execution context, representing current task (#3463, #4004)
Features
- Normalize global CLI arguments/flags (#2990, #3839)
- Turns on the static parser by default and adds the flag
--no-static-parserto disable it. (#3377, #3939) - Generic test FQNs have changed to include the relative path, resource, and column (if applicable) where they are defined. This makes it easier to configure them from the
testsblock indbt_project.yml(#3259, #3880 - Turn on partial parsing by default (#3867, #3989)
- Add
result:<status>selectors to automatically rerun failed tests and erroneous models. This makes it easier to rerun failed dbt jobs with a simple selector flag instead of restarting from the beginning or manually running the dbt models in scope. (#3859, #4017) dbt initis now interactive, generating profiles.yml when run inside existing project (#3625)
Under the hood
- Fix intermittent errors in partial parsing tests (#4060, #4068)
- Make finding disabled nodes more consistent (#4069, #4073)
- Remove connection from
render_with_contextduring parsing, thereby removing misleading log message (#3137, #4062) - Wait for postgres docker container to be ready in
setup_db.sh. (#3876, #3908) - Prefer macros defined in the project over the ones in a package by default (#4106, #4114)
- Dependency updates (#4079), (#3532
Contributors:
dbt Core 1.0.0b1
An initial beta release for v1.0.0.
Breaking changes
- The two type of test definitions are now "singular" and "generic" (instead of "data" and "schema", respectively). The
test_type:selection method acceptstest_type:singularandtest_type:generic. (It will also accepttest_type:schemaandtest_type:datafor backwards compatibility) (#3234, #3880). Not backwards compatible: The--dataand--schemaflags todbt testare no longer supported, and tests no longer have the tags'data'and'schema'automatically applied. - Deprecated the use of the
packagesargadapter.dispatchin favor of themacro_namespacearg. (#3895)
Features
- Normalize global CLI arguments/flags (#2990, #3839)
- Turns on the static parser by default and adds the flag
--no-static-parserto disable it. (#3377, #3939) - Generic test FQNs have changed to include the relative path, resource, and column (if applicable) where they are defined. This makes it easier to configure them from the
testsblock indbt_project.yml(#3259, #3880 - Turn on partial parsing by default (#3867, #3989)
Fixes
- Add generic tests defined on sources to the manifest once, not twice (#3347, #3880)
- Skip partial parsing if certain macros have changed (#3810, #3982)
- Enable cataloging of unlogged Postgres tables (3961, #3993)
- Fix multiple disabled nodes (#4013, #4018)
- Fix multiple partial parsing errors (#3996, #4020)
- Return an error instead of a warning when runing with
--warn-errorand no models are selected (#4006, #4019)
Under the hood
- Enact deprecation for
materialization-returnand replace deprecation warning with an exception. (#3896) - Build catalog for only relational, non-ephemeral nodes in the graph (#3920)
- Enact deprecation to remove the
releasearg from theexecute_macromethod. (#3900) - Enact deprecation for default quoting to be True. Override for the
dbt-snowflakeadapter so it staysFalse. (#3898) - Enact deprecation for object used as dictionaries when they should be dataclasses. Replace deprecation warning with an exception for the dunder methods of
__iter__and__len__for all superclasses of FakeAPIObject. (#3897) - Enact deprecation for
adapter-macroand replace deprecation warning with an exception. (#3901) - Add warning when trying to put a node under the wrong key. ie. A seed under models in a
schema.ymlfile. (#3899) - Plugins for
redshift,snowflake, andbigqueryhave moved to separate repos:dbt-redshift,dbt-snowflake,dbt-bigquery - Change the default dbt packages installation directory to
dbt_packagesfromdbt_modules. Also renamemodule-pathtopackages-install-pathto allow default overrides of package install directory. Deprecation warning added for projects using the olddbt_modulesname without specifying apackages-install-path. (#3523) - Update the default project paths to be
analysis-paths = ['analyses']andtest-paths = ['tests]. Also have starter project setanalysis-paths: ['analyses']from now on. (#2659) - Define the data type of
sourcesas an array of arrays of string in the manifest artifacts. (#3966, #3967)
Contributors:
dbt 0.21.0
dbt Core 0.21.0 - Louis Kahn (October 4, 2021)
Breaking changes
- Rename source freshness command, add full node selection, and align selection syntax with other tasks (#2987, #3554)
dbt source snapshot-freshness->dbt source freshness(backwards compatible)dbt source freshness --select source_name-->dbt source freshness --select source:source_name(not backwards compatible)
- dbt-snowflake: Disable most transactional logic. See note below for details.
Features
- Add
dbt buildcommand to run models, tests, seeds, and snapshots in DAG order. (#2743, #3490, #3608) - Introduce
on_schema_changeconfig to detect and handle schema changes on incremental models (#1132, #3387) - Capture changes to macros in
state:modified. Introduce newstate:sub-selectors:modified.body,modified.configs,modified.persisted_descriptions,modified.relation,modified.macros(#2704, #3278, #3559) - Enable setting configs in schema files for models, seeds, snapshots, analyses, tests (#2401, #3616)
- Make
--modelsand--selectsynonyms, except forls(to preserve existing behavior) (#3210, #3791) - Customize
lstask JSON output by adding new flag--output-keys(#3778, #3395) - Added default field in the
selectors.ymlto allow user to define default selector (#3448, #3875, #3892) - Log tests that are not indirectly selected. Add
--greedyflag totest,list,buildandgreedyproperty in yaml selectors (#3723, #3833) - Scrub environment secrets prefixed with
DBT_ENV_SECRET_from logs and console output (#3440, #3617)
Artifacts
- Added timing and thread information to
sources.jsonartifact (#3804, #3894) - Bump artifact schema versions for 0.21.0 (#3945)
Fixes
- Fix type coercion issues when fetching query result sets (#2984, #3499)
- Handle whitespace after a plus sign on the project config (#3526)
- Fix table and view materialization issue when switching from one to the other (#2161), #3547)
- Avoid caching schemas for tests when
store_failuresis not enabled (#3715, #3716) dbt debugshows a summary of whether all checks passed or not (#3831, #3832)- Fix bug with initializing a dataclass that inherits from
typing.Protocol, specifically fordbt.config.profile.Profile(#3843, #3855) - Introduce a macro,
get_where_subquery, for tests that usewhereconfig. Alias filtering subquery asdbt_subqueryinstead of resource identifier (#3857, #3859) - Use
group by column_nameinaccepted_valuestest for compatibility with most database engines (#3905, #3906) - Avoid infinite recursion in
state:modified.macroscheck (#3904, #3957) - Cast log messages to strings before scrubbing of prefixed env vars (#3971, #3972)
Under the hood
- Improve default view and table materialization performance by checking relational cache before attempting to drop temp relations (#3112, #3468)
- Move the example project used by
dbt initintodbtrepository, to avoid cloning an external repo (#3005, #3474, #3536) - Better interaction between
dbt initand adapters. Avoid raising errors while initializing a project (#2814, #3483) - Update
create_adapter_pluginsscript to include latest accessories, and stay up to date with latest dbt-core version (#3002, #3509) - Allow the default seed macro's SQL parameter,
%s, to be replaced by dispatching a new macro,get_binding_char(). This enables adapters with parameter marker characters such as?to not have to overridebasic_load_csv_rows. (#3622, #3623) - Add
adapter_unique_idto invocation context in anonymous usage tracking, to better understand dbt adoption (#3713, #3796) - Specify
macro_namespace = 'dbt'for all dispatched macros in the global project, making it possible to dispatch to macro implementations defined in packages. Dispatchgenerate_schema_nameandgenerate_alias_name(#3456, #3851)
Packages
- Better dbt hub registry packages version logging that prompts the user for upgrades to relevant packages (#3560, #3763, #3759)
- Alert users on package rename (hub.getdbt.com#180, #3825)
- Retry transient GitHub failures during download (#3546, #3729)
Performance
- Experimental parser now detects macro overrides of ref, source, and config builtins. (#3581, #3582)
- Add performance regression testing #3602
- Don't reload and validate schema files if they haven't changed (#3563, #3888)
Dependencies
- Require
werkzeug>=1(#3590)
Plugins
dbt-postgres
- Add optional
sslcert,sslkey, andsslrootcertprofile arguments to the Postgres connector. (#3472, #3473) - Add
connect_timeoutprofile configuration for Postgres and child adapters. (#3581, #3582)
dbt-redshift
dbt-snowflake
- Breaking: Turn off transactions and turn on
autocommitby default. Within dbt materializations, wrap DML statements in explicitbeginandcommit. 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 explicitbeginandcommit. Note also that this may affect user-space code that depends on transactions, such as pre-hooks and post-hooks that specifytransaction: trueortransaction: false. We recommend removing those references to transactions. (#2748, #3480, #3510) - Fix batching for large seeds on Snowflake (#3941, [#39...
dbt 0.21.0rc2
dbt 0.21.0rc1
An initial release candidate for v0.21.0.
Features
- Experimental parser now detects macro overrides of ref, source, and config builtins. (#3581, #3582)
- Add connect_timeout profile configuration for Postgres and Redshift adapters. (#3581, #3582)
- Enhance BigQuery copy materialization (#3570, #3606):
- to simplify config (default usage of
copy_materialization='table'if is is not found in global or local config) - to let copy several source tables into single target table at a time. (Google doc reference)
- to simplify config (default usage of
- Customize ls task JSON output by adding new flag
--output-keys(#3778, #3395) - Add support for execution project on BigQuery through profile configuration (#3707, #3708)
- Skip downstream nodes during the
buildtask when a test fails. (#3597, #3792) - Added default field in the
selectors.ymlto allow user to define default selector (#3448, #3875, #3892) - Added timing and thread information to sources.json artifact (#3804, #3894)
- Update cli and rpc flags for the
buildtask to align with other commands (--resource-type,--store-failures) (#3596, #3884)
Fixes
- Support BigQuery-specific aliases
target_datasetandtarget_projectin snapshot configs (#3694, #3834) dbt debugshows a summary of whether all checks passed or not (#3831, #3832)- Fix issue when running the
depstask after thelisttask in the RPC server (#3846, #3848, #3850) - Fix bug with initializing a dataclass that inherits from
typing.Protocol, specifically fordbt.config.profile.Profile(#3843, #3855) - Introduce a macro,
get_where_subquery, for tests that usewhereconfig. Alias filtering subquery asdbt_subqueryinstead of resource identifier (#3857, #3859) - Use group by column_name in accepted_values test for compatibility with most database engines (#3905, #3906)
- Separated table vs view configuration for BigQuery since some configuration is not possible to set for tables vs views. (#3682, #3691)
Under the hood
- Use GitHub Actions for CI (#3688, #3669)
- Better dbt hub registry packages version logging that prompts the user for upgrades to relevant packages (#3560, #3763, #3759)
- Allow the default seed macro's SQL parameter,
%s, to be replaced by dispatching a new macro,get_binding_char(). This enables adapters with parameter marker characters such as?to not have to overridebasic_load_csv_rows. (#3622, #3623) - Alert users on package rename (hub.getdbt.com#180, #3825)
- Add
adapter_unique_idto invocation context in anonymous usage tracking, to better understand dbt adoption (#3713, #3796) - Specify
macro_namespace = 'dbt'for all dispatched macros in the global project, making it possible to dispatch to macro implementations defined in packages. Dispatchgenerate_schema_nameandgenerate_alias_name(#3456, #3851) - Retry transient GitHub failures during download (#3729)
Contributors:
- @xemuliam (#3606)
- @sungchun12 (#3759)
- @dbrtly (#3834)
- @swanderz #3623
- @JasonGluck (#3582)
- @joellabes (#3669)
- @juma-adoreme (#3838)
- @annafil (#3825)
- @AndreasTA-AW (#3691)
- @Kayrnt (3707)
- @TeddyCr (#3448)
- @sdebruyn (#3906)
dbt 0.20.2
Fixes
- Fix issue when running the
depstask after thelisttask in the RPC server (#3846, #3848) - Fix bug with initializing a dataclass that inherits from
typing.Protocol, specifically fordbt.config.profile.Profile(#3843, #3855) - Avoid caching schemas for tests when
store_failuresis not enabled (#3715, #3716) - Fix bug in finding analysis nodes when applying analysis patch (#3764, #3767)
- Rewrite built-in generic tests to support
column_nameexpressions (#3790, #3811) - Check for existence of test node when removing. (#3711, #3750)
Under the hood
- Get more information on partial parsing version mismatches (#3757, #3758)
- Use GitHub Actions for CI (#3688, #3669)
- Switch to full reparse on partial parsing exceptions. Log and report exception information. (#3725, #3733)
- Check for existence of test node when removing. (#3711, #3750)
- Better error handling for BigQuery job labels that are too long. #3703
Contributors:
dbt 0.20.2rc2
A second release candidate for v0.20.2.
Under the hood
- Better error handling for BigQuery job labels that are too long. (#3612, #3703)
- Get more information on partial parsing version mismatches (#3757, #3758)
Fixes
- Avoid caching schemas for tests when
store_failuresis not enabled (#3715, #3716) - Fix bug in finding analysis nodes when applying analysis patch (#3764, #3767)
- Rewrite built-in generic tests to support
column_nameexpressions (#3790, #3811)
Contributors:
dbt 0.21.0b2
A second beta release for v0.21.0.
Features
- Capture changes to macros in
state:modified. Introduce newstate:sub-selectors:modified.body,modified.configs,modified.persisted_descriptions,modified.relation,modified.macros(#2704, #3278, #3559) - Enable setting configs in schema files for models, seeds, snapshots, analyses, tests (#2401, #3616)
Fixes
- Fix for RPC requests that raise a RecursionError when serializing Undefined values as JSON (#3464, #3687)
- Avoid caching schemas for tests when
store_failuresis not enabled (#3715, #3716)
Under the hood
dbt 0.20.2rc1
dbt 0.20.1
Features
- Adds
install-prereleaseparameter to hub packages inpackages.yml. When set toTrue, allows prerelease packages to be installed. By default, this parameter is False unless explicitly set to True.
Fixes
- Fix config merge behavior with experimental parser 3637
- Fix exception on yml files with all comments 3568
- Fix
store_failuresconfig when defined as a modifier foruniqueandnot_nulltests (#3575, #3577) - Fix
whereconfig withrelationshipstest by refactoring test SQL. Note: The defaultrelationshipstest now includes CTEs, and may need reimplementing on adapters that don't support CTEs nested inside subqueries. (#3579, #3583) - Partial parsing: don't reprocess SQL file already scheduled (#3589, #3620)
- Handle interator functions in model config (#3573)
- Partial parsing: fix error after changing empty yaml file (#3567, #3618)
- Partial parsing: handle source tests when changing test macro (#3584, #3620)
- Fix
dbt depsversion comparison logic which was causing incorrect pre-release package versions to be installed. (#3578, #3609) - Partial parsing: schedule new macro file for parsing when macro patching (#3627, #3627)
- Use
SchemaParser's render context to render test configs in order to supportvar()configured at the project level and passed in from the cli (#3564. #3646) - Partial parsing: check unique_ids when recursively removing macros (#3636)
Under the hood
- Add tracking for determine why
dbtneeds to re-parse entire project when partial parsing is enabled (#3572, #3652)
Docs
Under the hood
- Handle exceptions from anonymous usage tracking for users of
dbt-snowflakeon Apple M1 chips (#3162, #3661)
Contributors: