Skip to content

Releases: dbt-labs/dbt-utils

0.9.0

26 Aug 04:05
a976cdf

Choose a tag to compare

What's Changed

Changed functionality

  • 🚨 (Almost all) cross-db macros are now implemented in dbt Core instead of dbt-utils. A backwards-compatibility layer remains for now and will be removed in dbt utils 1.0 later this year. Completed by @dbeatty10 and @jtcohen6 in #597, #586 and #615
    • See #487 for further discussion on the backstory
    • If you are a package maintainer with a dependency on these macros, prepare for their removal by switching to {{ dbt.some_macro() }}. Refer to #package-ecosystem in the Community Slack for further assistance
  • Feature: Add option to remove the source_column_name on the union_relations macro by @christineberger in #624

Fixes

  • Use adapter.quote() instead of hardcoded BQ quoting for get_table_types_sql by @alla-bongard in #636

Documentation

New Contributors

Full Changelog: 0.8.6...0.9.0

0.8.6

15 Jun 19:46
ac072a3

Choose a tag to compare

dbt-utils v0.8.6

New features

  • New macros array_append and array_construct (#595)

Fixes

  • Use * in star macro if no columns (for SQLFluff) (#605, #561)
  • Only raise error within union_relations for build/run sub-commands (#606, #607)

Quality of life

  • Add slugify to list of Jinja Helpers (#602)

Under the hood

  • Fix make test for running integration tests locally (#344, #564, #591)

Contributors:

0.8.5

17 May 17:38
44eeb19

Choose a tag to compare

dbt-utils v0.8.5

🚨 deduplicate (#542, #548)

The call signature of deduplicate has changed. The previous call signature is marked as deprecated and will be removed in the next minor version.

  • The group_by argument is now deprecated and replaced by partition_by.
  • The order_by argument is now required.
  • The relation_alias argument has been removed as the macro now supports relation as a string directly. If you were using relation_alias to point to a CTE previously then you can now pass the alias directly to relation.

Before:

{% macro deduplicate(relation, group_by, order_by=none, relation_alias=none) -%}
...
{% endmacro %}

After:

{% macro deduplicate(relation, partition_by, order_by) -%}
...
{% endmacro %}

New features

  • Add an optional where clause parameter to get_column_values() to filter values returned (#511, #583)
  • Add where parameter to union_relations macro (#554)
  • Add Postgres specific implementation of deduplicate() (#548)
  • Add Snowflake specific implementation of deduplicate() (#543, #548)

Fixes

  • Enable a negative part_number for split_part() (#557, #559)

Quality of life

  • Documentation about listagg macro (#544, #560)
  • Fix links to macro section in table of contents (#555)
  • Use the ADR (Architectural Design Record) pattern for documenting significant decisions (#573)
  • Contributing guide (#574)
  • Add better documentation for deduplicate() (#542, #548)

Under the hood

  • Fail integration tests appropriately (#540, #545)
  • Upgrade CircleCI postgres convenience image (#584, #585)
  • Run test for deduplicate (#579, #580)
  • Reduce warnings when executing integration tests (#558, #581)
  • Framework for functional testing using pytest (#588)

Contributors:

0.8.4

08 Apr 02:04
3329933

Choose a tag to compare

Fixes get_relations_by_pattern in BigQuery (#536, #537)

0.8.3

07 Apr 22:48
37199d3

Choose a tag to compare

dbt-utils v0.8.3

New features

  • A macro for deduplicating data, deduplicate() (#335, #512)
  • A cross-database implementation of listagg() (#530)
  • A new macro to get the columns in a relation as a list, get_filtered_columns_in_relation(). This is similar to the star() macro, but creates a Jinja list instead of a comma-separated string. (#516)

Fixes

  • get_column_values() once more raises an error when the model doesn't exist and there is no default provided (#531, #533)
  • get_column_values() raises an error when used with an ephemeral model, instead of getting stuck in a compilation loop (#358, #518)
  • BigQuery materialized views work correctly with get_relations_by_pattern() (#525)

Quality of life

  • Updated references to 'schema test' in project file structure and documentation (#485, #521)
  • date_trunc() and datediff() default macros now have whitespace control to assist with linting and readability #529
  • star() no longer raises an error during SQLFluff linting (#506, #532)

Contributors:

0.8.2

03 Mar 01:25
5717b10

Choose a tag to compare

Fixes

  • Fixed an error with union_relations() when no include/exclude parameters were provided

0.8.1

23 Feb 03:00
a7f4f51

Choose a tag to compare

dbt-utils v0.8.1

New features

  • A cross-database implementation of any_value() (#497, #501)
  • A cross-database implementation of bool_or() (#504)

Under the hood

  • add dbt_packages/ to .gitignore #463
  • Remove block comments to make date_spine() macro compatible with the Athena connector (#462)

Fixes

  • type_timestamp macro now explicitly casts postgres and redshift warehouse timestamp data types as timestamp without time zone, to be consistent with Snowflake behaviour (timestamp_ntz).
  • union_relations macro will now raise an exception if the use of include or exclude results in no columns (#473, #266).
  • get_relations_by_pattern() works with foreign data wrappers on Postgres again. (#357, #476)
  • star() will only alias columns if a prefix/suffix is provided, to allow the unmodified output to still be used in group by clauses etc. #468
  • The sequential_values test is now compatible with quoted columns #479
  • pivot() escapes values containing apostrophes #503

Contributors:

0.8.0

02 Dec 21:59

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

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

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: