Closed bkimjin closed 4 months ago
When attempting to use this test for a string and a date column, it errors out on unpivot_columns because they are different data types.
unpivot_columns
The test should complete.
Add the following lines to a model in the yml file:
tests: - dbt_expectations.expect_select_column_values_to_be_unique_within_record: column_list: ["any_string_field", "any_date_field"]
Run dbt test
dbt test
- OS: MacOS - Python: 3.10.12 - dbt: 1.6.9 - dbt-expectations: 0.10.1
Note: dbt-expectations currently does not support database adapters other than the ones listed below.
This could be solved by wrapping the {{column}} in MD5:
select row_index, '{{ column }}' as column_name, {{ column }} as column_value from column_values
to:
select row_index, '{{ column }}' as column_name, md5({{ column }}) as column_value from column_values
Is this a new bug in dbt-expectations?
Current Behavior
When attempting to use this test for a string and a date column, it errors out on
unpivot_columns
because they are different data types.Expected Behavior
The test should complete.
Steps To Reproduce
Add the following lines to a model in the yml file:
Run
dbt test
Relevant log output
Environment
Which database adapter are you using with dbt?
Note: dbt-expectations currently does not support database adapters other than the ones listed below.
Additional Context
This could be solved by wrapping the {{column}} in MD5:
to: