Releases: dbt-labs/dbt-utils
Releases · dbt-labs/dbt-utils
0.9.0
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_nameon theunion_relationsmacro by @christineberger in #624
Fixes
- Use adapter.quote() instead of hardcoded BQ quoting for get_table_types_sql by @alla-bongard in #636
Documentation
- standardize yml indentation under the 'models:' line on the README by @leoebfolsom in #613
- Use MADR 3.0.0 for formatting decision records by @dbeatty10 in #614
- Docs cleanup by @dbeatty10 in #620
- Add not_accepted_values to README ToC by @david-beallor in #646
New Contributors
- @leoebfolsom made their first contribution in #613
- @christineberger made their first contribution in #624
- @alla-bongard made their first contribution in #636
- @david-beallor made their first contribution in #646
Full Changelog: 0.8.6...0.9.0
0.8.6
dbt-utils v0.8.6
New features
- New macros
array_appendandarray_construct(#595)
Fixes
- Use
*instarmacro if no columns (for SQLFluff) (#605, #561) - Only raise error within
union_relationsforbuild/runsub-commands (#606, #607)
Quality of life
- Add slugify to list of Jinja Helpers (#602)
Under the hood
Contributors:
- @swanjson (#561)
- @dataders (#561)
- @epapineau (#583)
- @graciegoheen (#595)
- @jeremyyeo (#606)
0.8.5
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_byargument is now deprecated and replaced bypartition_by. - The
order_byargument is now required. - The
relation_aliasargument has been removed as the macro now supportsrelationas a string directly. If you were usingrelation_aliasto point to a CTE previously then you can now pass the alias directly torelation.
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
whereclause parameter toget_column_values()to filter values returned (#511, #583) - Add
whereparameter tounion_relationsmacro (#554) - Add Postgres specific implementation of
deduplicate()(#548) - Add Snowflake specific implementation of
deduplicate()(#543, #548)
Fixes
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:
- @graciegoheen (#560)
- @judahrand (#548)
- @clausherther (#555)
- @LewisDavies (#554)
- @epapineau (#583)
- @b-per (#559)
0.8.4
0.8.3
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 thestar()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()anddatediff()default macros now have whitespace control to assist with linting and readability #529star()no longer raises an error during SQLFluff linting (#506, #532)
Contributors:
- @judahrand (#512)
- @b-moynihan (#521)
- @sunriselong (#529)
- @jpmmcneill (#533)
- @KamranAMalik (#532)
- @graciegoheen (#530)
- @luisleon90 (#525)
- @epapineau (#518)
- @patkearns10 (#516)
0.8.2
0.8.1
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_timestampmacro now explicitly casts postgres and redshift warehouse timestamp data types astimestamp without time zone, to be consistent with Snowflake behaviour (timestamp_ntz).union_relationsmacro will now raise an exception if the use ofincludeorexcluderesults 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 ingroup byclauses etc. #468- The
sequential_valuestest is now compatible with quoted columns #479 pivot()escapes values containing apostrophes #503
Contributors:
- grahamwetzler (#473)
- Aesthet (#476)
- Kamitenshi (#462)
- nickperrott (#468)
- jelstongreen (#468)
- armandduijn (#479)
- mdutoo (#503)
0.8.0
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_rangestest is now always calledpartition_by_col. This enables compatibility with--store-failureswhen 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
🚨 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-versionto have an upper bound of1.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
🚨 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)