Releases: dbt-labs/dbt-core
Releases · dbt-labs/dbt-core
Release list
dbt Core 1.0.0rc2
A second release candidate for dbt-core v1.0.0. Changes since rc1:
Breaking changes
- Restrict secret env vars (prefixed
DBT_ENV_SECRET_) toprofiles.yml+packages.ymlonly. Raise an exception if a secret env var is used elsewhere (#4310, #4311) - Reorder arguments to
config.get()so thatdefaultis second (#4273, #4297)
Features
- Avoid error when missing column in YAML description (#4151, #4285)
- Allow
--deferflag todbt snapshot(#4110, #4296) - Install prerelease packages when
versionexplicitly references a prerelease version, regardless ofinstall-prereleasestatus (#4243, #4295) - Add data attributes to json log messages (#4301)
- Add event codes to all log events (#4319)
Fixes
- Fix serialization error with missing quotes in metrics model ref (#4252, #4287)
- Correct definition of 'created_at' in ParsedMetric nodes (#4298, #4299)
Under the hood
- Add --indirect-selection parameter to profiles.yml and builtin DBT_ env vars; stringified parameter to enable multi-modal use (#3997, #4270)
- Fix filesystem searcher test failure on Python 3.9 (#3689, #4271)
- Clean up deprecation warnings shown for
dbt_project.ymlconfig renames (#4276, #4291) - Fix metrics count in compiled project stats (#4290, #4292)
- First pass at supporting more dbt tasks via python lib (#4200)
Contributors
- @kadero (#4285, #4296)
- @joellabes (#4295)
dbt 0.21.1rc2
dbt Core 1.0.0rc1
A first release candidate for dbt-core v1.0.0. Includes everything in b1 + b2, plus:
Breaking changes
- Replace
greedyflag/property for test selection withindirect_selection: eager/cautiousflag/property. Set toeagerby default. Note: This reverts test selection to its pre-v0.20 behavior by default.dbt test -s my_modelwill select multi-parent tests, such asrelationships, that depend on unselected resources. To achieve the behavior change in v0.20 + v0.21, set--indirect-selection=cautiouson the CLI orindirect_selection: cautiousin yaml selectors. (#4082, #4104) - In v1.0.0,
pip install dbtwill raise an explicit error. Instead, please usepip install dbt-<adapter>(to use dbt with that database adapter), orpip install dbt-core(for core functionality). For parity with the previous behavior ofpip install dbt, you can use:pip install dbt-core dbt-postgres dbt-redshift dbt-snowflake dbt-bigquery(#4100, #4133) - Reorganize the
global_project(macros) into smaller files with clearer names. Remove unused global macros:column_list,column_list_for_create_table,incremental_upsert(#4154) - Introduce structured event interface, and begin conversion of all legacy logging (#3359, #4055)
- This is a breaking change for adapter plugins, requiring a very simple migration. See
eventsmodule README for details. - If you maintain another kind of dbt-core plugin that makes heavy use of legacy logging, and you need time to cut over to the new event interface, you can re-enable the legacy logger via an environment variable shim,
DBT_ENABLE_LEGACY_LOGGER=True. Be advised that we will remove this capability in a future version of dbt-core.
- This is a breaking change for adapter plugins, requiring a very simple migration. See
Features
- Allow nullable
error_afterin source freshness (#3874, #3955) - Add
metricsnodes (#4071, #4235) - Add support for
dbt init <project_name>, and support forskip_profile_setupargument (dbt init -s) (#4156, #4249)
Fixes
- Changes unit tests using
assertRaisesRegexptoassertRaisesRegex(#4136, #4136) - Allow retries when the answer from a
dbt depsisNone(#4178, #4225)
Docs
- Fix non-alphabetical sort of Source Tables in source overview page (docs#81, docs#218)
- Add title tag to node elements in tree (docs#202, docs#203)
- Account for test rename:
schema→generic,data→singular. Usetest_metadatainstead ofschema/datatags to differentiate (docs#216, docs#222) - Add
metrics(core#216, docs#223)
Under the hood
- Bump artifact schema versions for 1.0.0: manifest v4, run results v4, sources v3. Notable changes: added
metricsnodes; schema test + data test nodes are renamed to generic test + singular test nodes; freshness threshold default values (#4191) - Speed up node selection by skipping
incorporate_indirect_nodesif not needed (#4213, #4214) - When
on_schema_changeis set, pass common columns asdest_columnsin incremental merge macros (#4144, #4170) - Clear adapters before registering in
libmodule config generation (#4218) - Remove official support for python 3.6, which is reaching end of life on December 23, 2021 (#4134, #4223)
Contributors
dbt 0.21.1rc1
An initial release candidate for v0.21.1.
Fixes
- Performance: Use child_map to find tests for nodes in resolve_graph (#4012, #4057)
- Switch
unique_fieldfrom abstractproperty to optional property. Add docstring (#4025, #4028) - Fix multiple partial parsing errors (#3996, #4020)
- Include only relational nodes in
database_schema_set(#4063, #4077) - Fixed bug with
error_iftest option (#4070) - Added support for tests on databases that lack real boolean types. (#4084)
- Prefer macros defined in the project over the ones in a package by default (#4106, #4114)
- Scrub secrets coming from
CommandErrors so they don't get exposed in logs. (#4138) - Syntax fix in
alter_relation_add_remove_columnsif only removing columns inon_schema_change: sync_all_columns(#4147) - Increase performance of graph subset selection (#4135,#4155)
- Add downstream test edges for
buildtask only. Restore previous graph construction, compilation performance, and node selection behavior (test+) for all other tasks (#4135, #4143) - Don't require a strict/proper subset when adding testing edges to specialized graph for
build(#4158, #4158) - Capping
google-api-coreto version1.31.3due toprotobufdependency conflict (#4192)
Contributors:
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: