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

#257 Add count to expect_compound_columns_to_be_unique #261

Merged
merged 2 commits into from
May 24, 2023

Conversation

VDFaller
Copy link
Contributor

Issue this PR Addresses/Closes

Closes #257

Summary of Changes

Just adds a count(*) as n_records to expect_compound_columns_to_be_unique

Why Do We Need These Changes

Consistency between dbt-expectations and dbt-core uniqueness tests.

Reviewers

@clausherther

Copy link
Contributor

@clausherther clausherther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick PR! Minor change, but should be good to go if tests pass.

@@ -39,6 +39,7 @@ with validation_errors as (
{% for column in columns -%}
{{ column }}{% if not loop.last %},{% endif %}
{%- endfor %}
,count(*) as {{adapter.quote("n_records")}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slight nit: we do commas at the of lines in this repo, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you mean end. On it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need me to rebase the commits?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks!

Copy link
Contributor

@clausherther clausherther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@clausherther clausherther merged commit 6700bbc into calogica:main May 24, 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

Successfully merging this pull request may close these issues.

[Feature Request] Add count to expect_compound_columns_to_be_unique
2 participants