github dbt-labs/dbt-utils 1.4.2

58 minutes ago

What's Changed

  • fix equal_rowcount between 2 different tables by @light-le in #987
  • fix: return 0 in equal_rowcount when both models have 0 rows by @i-125 in #974
  • fix: NULL-safe diff calculation in equal_rowcount by @sdebruyn in #1090
  • fix: treat NULL group keys as ordinary groups in equal_rowcount by @dbeatty10 in #1151
  • fix: fail fewer_rows_than when both models have 0 rows by @dbeatty10 in #1144
  • fix: show 0 instead of NULL in fewer_rows_than count columns for unmatched groups by @dbeatty10 in #1146
  • fix: treat NULL group keys as ordinary groups in fewer_rows_than by @dbeatty10 in #1152

Bug fixes for data tests

This release causes some scenarios for the equal_rowcount and equal_rowcount generic data tests that previously passed ✅ to fail ❌ instead.

The previous behavior was incorrect, and the new behavior is correct instead. If this test starts failing for people, their options are to:

All scenarios for the dbt_utils.equal_rowcount generic data test

Before / After: ✅ = test passes, ❌ = test fails, "error" = dbt errors out.

Scenario Before After
equal_rowcount, groups only in one model (disjoint) ✅ ❌
equal_rowcount, no groups, other model empty ✅ ❌
equal_rowcount, NULL group key in both models with different counts ✅ ❌
equal_rowcount, NULL group key in only one model ✅ ❌
equal_rowcount, both models empty error ✅
equal_rowcount, NULL group key in both models with equal counts ✅ ✅

All scenarios for the dbt_utils.fewer_rows_than generic data test

Scenario Before After
fewer_rows_than, ours has a group the other model lacks ✅ ❌
fewer_rows_than, no groups, ours has rows, other model empty ✅ ❌
fewer_rows_than, NULL group key in both models with equal counts ✅ ❌
fewer_rows_than, NULL group key in our model only ✅ ❌
fewer_rows_than, both models empty error ❌
fewer_rows_than, no groups, ours empty, other has rows ✅ ✅
fewer_rows_than, NULL group key in both models, ours has fewer rows ✅ ✅

Under the hood / minor changes

New Contributors

Full Changelog: 1.4.1...1.4.2

Don't miss a new dbt-utils release

NewReleases is sending notifications on new releases.