Skip to content

Unexpected DQI warnings on medical_claim data type checks #1063

@davidshimamoto

Description

@davidshimamoto

Describe the bug - Required
When checking test results in the DQL dashboard, unexpected warnings for data type checks are showing.


Environment - Required

  • Tuva project package version (e.g. 0.6.0): 0.15.0
  • dbt version (e.g. 1.7):
  • dbt type (e.g. dbt cloud or dbt CLI): cli
  • Data warehouse (e.g. Snowflake): duckdb

To Reproduce
Steps to reproduce the behavior:

  1. Run dbt test -s input_layer__medical_claim
  2. Check results on the dql dashboard

Expected behavior
These warnings do not show up when there is a valid data type.


Screenshots
If applicable, add screenshots to help explain your problem.


Additional context
I blieve the problem is in the else clause in the snippet below, that last parameter should match the wrapper parameter.

{% test expect_column_values_to_be_in_type_list(model, column_name, column_type_list) %}
  {% if is_fabric() %}
    SELECT COLUMN_NAME
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE
      TABLE_NAME = '{{ model.name }}'
      {% if model.schema %}AND TABLE_SCHEMA = '{{ model.schema }}'{% endif %}
      AND DATA_TYPE NOT IN (
        {% for column_type in column_type_list %}
          '{{ column_type }}'{% if not loop.last %},{% endif %}
        {% endfor %}
      )
      AND COLUMN_NAME = '{{ quote_column(column_name)}}'
  {% else %}
    {{ dbt_expectations.test_expect_column_values_to_be_in_type_list(model, column_name, column_type) }}
  {% endif %}
{% endtest %}```

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    👍 Ready to Pull

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions