Skip to content

allow expressions in group_by of expect_grouped_row_values_to_have_re…#42

Open
ssuhre wants to merge 1 commit into
metaplane:mainfrom
ssuhre:main
Open

allow expressions in group_by of expect_grouped_row_values_to_have_re…#42
ssuhre wants to merge 1 commit into
metaplane:mainfrom
ssuhre:main

Conversation

@ssuhre
Copy link
Copy Markdown

@ssuhre ssuhre commented May 4, 2026

Summary of Changes

To allow expressions like JSON_VALUE(json_col.field) in group_by columns in the expect_grouped_row_values_to_have_recent_data test, the first occurrence of group_by columns is aliase. Later references then use this alias.

Why Do We Need These Changes

Some of our models make use of JSON type columns.
Information inside the JSON is needed to determine groups which should have recent data.
This PR avoids unpacking the JSON into further columns within the same model or even creating a downstream model just to test on.

Reviewers

@GuruM

Notes

I ran the integration_tests project and tested our use case with a local installation of dbt-expectations.

If you need further info or changes, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant