Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] expect_column_values_to_be_null should succeed for empty arrays #272

Open
ilkernator opened this issue Aug 7, 2023 · 1 comment

Comments

@ilkernator
Copy link

Is your feature request related to a problem? Please describe.
I'm currently leveraging dbt-expectations in a project that is supposed to compile Hive queries. However, in many cases, when there is a column of type 'array' or 'struct(array)', the expect_column_values_to_be_null.sql-test can be misleading as the array could be simply "empty", i.e. '[ ]', '[" "]', ...

Describe the solution you'd like
I've created two very basic "column_values_basic" macros in my project that work just perfectly. Basically, I'm using the array_contains() and the size(). Hive functions to assert the column is empty. So I wanted to share this with the community.

Describe alternatives you've considered
I haven't thought about an alternative to be honest, as the need was there for me. However, I tried to keep the new tests as simple as possible.

Additional context
n.a.

@clausherther
Copy link
Contributor

Thanks for sharing this. FYI, we don't support hive and have no plans to add support for hive in the future.

@clausherther clausherther changed the title [Feature Request] [Feature Request] expect_column_values_to_be_null should succeed for empty arrays Aug 16, 2023
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

No branches or pull requests

2 participants