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

[BUG] Accepted Values test failing when kpi_category is not one of the 6 main categories #14

Closed
1 of 5 tasks
paulg66 opened this issue Jan 17, 2024 · 3 comments · Fixed by #15
Closed
1 of 5 tasks
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@paulg66
Copy link
Contributor

paulg66 commented Jan 17, 2024

Describe the bug

If a test is added that does not default to one of the six kpi categories, build fails because of this test. The test doesn't allow "Other" as a KPI category or any customer kpi category that is defined in a test

image

Steps to reproduce

Add a test with a different kpi_category, example:
tests: - dq_tools.not_null_where_db: severity_level: error kpi_category: TEST

Expected results

The test should not fail

Actual results

The test fails

Screenshots and log output

16:09:21 On test.dq_tools.accepted_values_bi_column_analysis_kpi_category__Validity__Timeliness__Accuracy__Uniqueness__Completeness__Consistency.567ad2dc7e: select
      count(*) as failures,
      count(*) != 0 as should_warn,
      count(*) != 0 as should_error
    from (
   with all_values as (
    select
        kpi_category as value_field,
        count(*) as n_records
    from ANALYTICS_DEV.dbt_pgallagher.bi_column_analysis
    group by kpi_category
)
select *
from all_values
where value_field not in (
    'Validity','Timeliness','Accuracy','Uniqueness','Completeness','Consistency'
)
    ) dbt_internal_test
16:09:21 Opening a new connection, currently in state closed
16:09:22 SQL status: SUCCESS 1 in 0.0 seconds
16:09:22 Timing info for test.dq_tools.accepted_values_bi_column_analysis_kpi_category__Validity__Timeliness__Accuracy__Uniqueness__Completeness__Consistency.567ad2dc7e (execute): 16:09:21.747536 => 16:09:22.268494
16:09:22 On test.dq_tools.accepted_values_bi_column_analysis_kpi_category__Validity__Timeliness__Accuracy__Uniqueness__Completeness__Consistency.567ad2dc7e: Close
16:09:22 105 of 187 FAIL 1 accepted_values_bi_column_analysis_kpi_category__Validity__Timeliness__Accuracy__Uniqueness__Completeness__Consistency  [FAIL 1 in 0.64s]

System information

The contents of your packages.yml file:

  - package: infinitelambda/dq_tools
    version: [">=1.4.0", "<1.5.0"]

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

1.6

Additional context

All that is needed to add "Other" to the list of excepted values in this test
(https://github.com/infinitelambda/dq-tools/blob/11b696b9f9c066183619563b9ca5a850bf3f50f0/models/03_mart/data-quality-score/bi_column_analysis.yml#L23C6-L23C6)

Are you interested in contributing the fix?

I can update the test, will need someone to deploy it.

@paulg66 paulg66 added the bug Something isn't working label Jan 17, 2024
@il-dat
Copy link
Collaborator

il-dat commented Jan 30, 2024

Hi @paulg66 Thanks for raising this issue 🙌
Sorry for not getting back sooner on this, are you willing to open a PR now? Please help to let me know if that's the case (I will go fix it otherwise). I agree to support the "Other" KPI which should be straightforward as mentioned in your additional context section.

I will go release 1.4.3 asap once it's ready.

@il-dat il-dat added the help wanted Extra attention is needed label Jan 30, 2024
@paulg66 paulg66 mentioned this issue Jan 31, 2024
10 tasks
@paulg66
Copy link
Contributor Author

paulg66 commented Jan 31, 2024

HI @il-dat , thanks for getting back to me. I added 'Other' to the accepted values tests in this PR.

@il-dat il-dat closed this as completed in #15 Feb 5, 2024
@il-dat
Copy link
Collaborator

il-dat commented Feb 5, 2024

Thanks @paulg66 The CI pipeline is quite broken now, I will fix it later. For this change, I manually trigger the test and looks good.

Since this is the behavioral change, so I will go and tag for a major release 1.5 soon.

Thanks again for the help here 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants