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] With expect expect_column_values_to_be_of_type test #298

Open
1 of 2 tasks
adrikosm opened this issue Jan 16, 2024 · 0 comments
Open
1 of 2 tasks

[BUG] With expect expect_column_values_to_be_of_type test #298

adrikosm opened this issue Jan 16, 2024 · 0 comments

Comments

@adrikosm
Copy link

Is this a new bug in dbt-expectations?

  • I believe this is a new bug in dbt-expectations
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

So the issue is coming directly from the - dbt_expectations.expect_column_values_to_be_of_type:. When testing with text, string ,or char values it returns 1 warning even though it should not.

Note:
When running the --store-failures command the first row returns that it has found a varchar value. This is the same whether the column_type is text string or char.

Expected Behavior

The example code i am using is :

  - name: table_name
    description: >
      Table Description
    columns:
      - name: text_only_column
        description: Column that only has text values 
        tests:
          - dbt_expectations.expect_column_values_to_be_of_type:
              column_type: text
              config:
                severity: warn
                warn_if: "!=0"
          - unique:
              config:
                severity: warn
                warn_if: "!=0"

So i expect the run to not reproduce any errors since all of the values inside are handpicked to be text.

Steps To Reproduce

I have provided the code example along side the packages used in order to reproduce that error.

Environment

- OS: MacOS
- Python: 3.10.9
- dbt: 1.7.4
- dbt-snowflake-connector: 1.7.1
- dbt-expectations: 0.10.1 

Which database adapter are you using with dbt?

I am using snowflake adapter

Additional Context

Packages used

packages:
  - package: dbt-labs/codegen
    version: 0.11.0
  - package: calogica/dbt_expectations
    version: 0.10.1
  - package: dbt-labs/dbt_utils
    version: 1.1.1
  - package: Snowflake-Labs/dbt_constraints
    version: 0.6.2
@adrikosm adrikosm changed the title [BUG] [BUG] With expect expect_column_values_to_be_of_type test Jan 16, 2024
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

1 participant