calogica / dbt-expectations

Port(ish) of Great Expectations to dbt test macros
https://calogica.github.io/dbt-expectations/
Apache License 2.0
1.06k stars 130 forks source link

Expect column values types to be in type list fails in redshift #130

Closed nicholasyager closed 2 years ago

nicholasyager commented 2 years ago

Currently in 0.5.0 (we made the leap to upgrade from 0.2.4) we are experiencing an issue when using the expect_column_values_to_be_in_type_list macro on Redshift which yields the following issue:

[2021-12-06 10:59:13] [XX000] ERROR: failed to find conversion function from "unknown" to text

This appears to be coming from the generation of the relation_column andrelation_column_type` columns. https://github.com/calogica/dbt-expectations/blob/d7f98601811db2532510a70103f66f9784bc979c/macros/schema_tests/column_values_basic/expect_column_values_to_be_in_type_list.sql#L11

I suspect this can be resolved using the same methodology used to resolve issue https://github.com/calogica/dbt-expectations/issues/98 in PR https://github.com/calogica/dbt-expectations/pull/101. I'll test out how the changes work today and send out a PR if it works out.