Skip to content

Releases: dbt-labs/dbt-utils

0.8.0

02 Dec 21:59
Compare
Choose a tag to compare

dbt-utils v0.8.0

🚨 Breaking changes

  • dbt ONE POINT OH is here! This version of dbt-utils requires any version (minor and patch) of v1, which means far less need for compatibility releases in the future.
  • The partition column in the mutually_exclusive_ranges test is now always called partition_by_col. This enables compatibility with --store-failures when multiple columns are concatenated together. If you have models built on top of the failures table, update them to reflect the new column name. (#423, #430)

Contributors:

0.7.6

02 Dec 21:45
e987f9b
Compare
Choose a tag to compare

🚨 This is a compatibility release in preparation for dbt-core v1.0.0 (🎉). Projects using dbt-utils 0.7.6 with dbt-core v1.0.x can expect to see a deprecation warning. This will be resolved in dbt_utils v0.8.0.

Another day, another release!

Under the hood

  • Change require-dbt-version to have an upper bound of 1.1.0, so that all patches in the 1.0.x family are compatible with this release until people are ready to fully upgrade to dbt utils 0.8.0.

0.7.5

02 Dec 02:08
Compare
Choose a tag to compare

🚨 This is a compatibility release in preparation for dbt-core v1.0.0 (🎉). Projects using dbt-utils 0.7.5 with dbt-core v1.0.0 can expect to see a deprecation warning. This will be resolved in dbt_utils v0.8.0.

Fixes

  • Regression in get_column_values() where the default would not be respected if the model didn't exist. (#444, #448)

Under the hood

  • get_url_host() macro now correctly handles URLs beginning with android-app:// (#426)

Contributors:

0.7.4

11 Nov 03:07
b42e6f9
Compare
Choose a tag to compare

🚨 This is a compatibility release in preparation for dbt-core v1.0.0 (🎉). Projects using dbt-utils 0.7.4 with dbt-core v1.0.0 can expect to see a deprecation warning. This will be resolved in dbt-utils v0.8.0.

Fixes

  • get_column_values() now works correctly with mixed-quoting styles on Snowflake (#424, #440)
  • Remove extra semicolon in insert_by_period materialization that was causing errors (#439)
  • Swap limit 0 out for {{ limit_zero() }} on the slugify() tests to allow for compatibility with tsql-utils (#437)

Under the hood

  • Bump require-dbt-version to have an upper bound of '<=1.0.0'.
  • Url link fixes within the README for not_constant, dateadd, datediff and updated the header Logger to Jinja Helpers. (#431)
  • Fully qualified a cte_name.* in the equality test to avoid an Exasol error (#420)
  • get_url_host() macro now correctly handles URLs beginning with android-app:// (#426)

Contributors:

0.7.4-b1

27 Oct 23:06
cd4c5e2
Compare
Choose a tag to compare
0.7.4-b1 Pre-release
Pre-release

This is a compatibility release in preparation for dbt-core v1.0.0 (🎉). When dbt-core 1.0.0 hits release candidate status, we will release the final version of 0.7.4

🚨 Projects using utils 0.7.4 with Core 1.0.0 can expect to see a deprecation warning. This will be resolved in 0.8.0 of dbt_utils alongside the final version of 1.0.0.

🚨🚨 We have renamed the master branch to main. If you have a local version of dbt-utils, you will need to update to the new branch. See the GitHub docs for more details.

Under the hood

  • Bump require-dbt-version to have an upper bound of '<=1.0.0'.
  • Url link fixes within the README for not_constant, dateadd, datediff and updated the header Logger to Jinja Helpers. (#431)
  • Fully qualified a cte_name.* in the equality test to avoid an Exasol error (#420)

Contributors:

0.7.3

17 Sep 11:23
b1f5271
Compare
Choose a tag to compare

Several bug fixes

  • Fix bug introduced in 0.7.2 in dbt_utils.star which could cause the except argument to drop columns that were not explicitly specified
  • Remove deprecated argument from not_null_proportion
  • Change final select statement in not_null_proportion to avoid false positive failures

0.7.2

15 Sep 14:15
fc18046
Compare
Choose a tag to compare

This is a patch release with several minor changes and one new test:

New:

  • Added not_null_proportion schema test that allows the user to specify the minimum (at_least) tolerated proportion (e.g., 0.95) of non-null values

Under the Hood:

  • Allow user to provide any case type when defining the exclude argument in dbt_utils.star()
  • Log whole row instead of just column name in 'accepted_range' schema test to allow better visibility into failures
  • use column name to group in 'get_column_values ' to allow better cross db functionality

dbt-utils 0.7.1

06 Aug 12:42
696cf26
Compare
Choose a tag to compare

Bump require-dbt-version: [">=0.20.0", "<0.22.0"]. This package will support dbt v0.21 (currently in beta) without any breaking changes.

dbt-utils 0.7.0

07 Jun 20:01
2fbadf7
Compare
Choose a tag to compare

Breaking changes

🚨 New dbt version

dbt v0.20.0 or greater is required for this release. dbt v0.20.0rc1 is currently available as a release candidate. If you are not ready to upgrade, consider using a previous version of this package.

In accordance with the version upgrade, this package release includes breaking changes to:

  • Generic (schema) tests
  • dispatch functionality

🚨 get_column_values

The order of (optional) arguments has changed in the get_column_values macro.

Before:

{% macro get_column_values(table, column, order_by='count(*) desc', max_records=none, default=none) -%}
...
{% endmacro %}

After:

{% macro get_column_values(table, column, max_records=none, default=none) -%}
...
{% endmacro %}

If you were relying on the position to match up your optional arguments, this may be a breaking change — in general, we recommend that you explicitly declare any optional arguments (if not all of your arguments!)

-- before: This works on previous version of dbt-utils, but on 0.7.0, the `50` would be passed through as the `order_by` argument
{% set payment_methods = dbt_utils.get_column_values(
        ref('stg_payments'),
        'payment_method',
        50
) %}

-- after
{% set payment_methods = dbt_utils.get_column_values(
        ref('stg_payments'),
        'payment_method',
        max_records=50
) %}

Features

  • Add new argument, order_by, to get_column_values (code originally in #289 from @clausherther, merged via #349)
  • Add slugify macro, and use it in the pivot macro. 🚨 This macro uses the re module, which is only available in dbt v0.19.0+. As a result, this feature introduces a breaking change. (#314)

Under the hood

  • Update the default implementation of concat macro to use || operator (#373 from @ChristopheDuong). Note this may be a breaking change for adapters that support concat() but not ||, such as Apache Spark.
  • Use power() instead of pow() in generate_series() and haversine_distance() as they are synonyms in most SQL dialects, but some dialects only have power() (#354 from @swanderz)

dbt-utils 0.6.6

01 Jun 14:12
00ebcb8
Compare
Choose a tag to compare

This is a patch release, with the following fix:

  • Make sequential_values schema test use dbt_utils.type_timestamp() to allow for compatibility with db's without timestamp data type. #376 from @swanderz