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

fix: not_null_proportion test deprecation warning and performance #416

Merged
merged 7 commits into from
Sep 17, 2021

Conversation

jasnonaz
Copy link
Contributor

Two changes on the not_null_proportion.

  1. Changed the dispatch to use 'macro_namespace' to avoid deprecation warning
  2. Changed the final select to be * instead of count(*) to avoid false positive results.

This is a:

  • [X ] bug fix PR with no breaking changes — please ensure the base branch is master
  • new functionality — please ensure the base branch is the latest dev/ branch
  • a breaking change — please ensure the base branch is the latest dev/ branch

Description & motivation

Checklist

  • I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered)
    • BigQuery
    • Postgres
    • Redshift
    • Snowflake

@jasnonaz jasnonaz marked this pull request as draft September 15, 2021 21:47
@jasnonaz jasnonaz changed the title not_null_proportion test fix fix: not_null_proportion test deprecation warning and performance Sep 16, 2021
@@ -1,5 +1,5 @@
{% macro test_not_null_proportion(model) %}
{{ return(adapter.dispatch('test_not_null_proportion', packages = dbt_utils._get_utils_namespaces())(model, **kwargs)) }}
{{ return(adapter.dispatch('test_not_null_proportion', macro_namespace = 'dbt_utils')(model, **kwargs)) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine. You can also have this just be 'dbt_utils' (excluding macro_namespace keyword arg name) for parity with other macros.

select
count(*)
select
*
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@jasnonaz jasnonaz marked this pull request as ready for review September 16, 2021 18:16
@jasnonaz jasnonaz changed the base branch from master to fix-star-capitalization-object September 16, 2021 18:56
@jasnonaz jasnonaz changed the base branch from fix-star-capitalization-object to fix-star-capitalization September 16, 2021 18:57
@jasnonaz jasnonaz changed the base branch from fix-star-capitalization to master September 16, 2021 18:58
@jasnonaz jasnonaz merged commit b1f5271 into master Sep 17, 2021
@joellabes joellabes deleted the fix-not-null-proportion branch October 21, 2021 22:35
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.

2 participants