calogica / dbt-expectations

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

`expect_column_values_to_match_regex` test doesn't work with `dbt-databricks` adapter #228

Closed followingell closed 1 year ago

followingell commented 1 year ago

Context:

Behavior: I'm not sure if dbt-expectations supports dbt-databricks(?), however if so:

Using expect_column_values_to_match_regex with the dbt-databricks adapter I am greeted with the following error:

21:34:21  Runtime Error in test dbt_expectations_source_expect_column_values_to_match_regex_ ...
21:34:21    Invalid number of arguments for function regexp_instr. Expected: one of 2 and 3; Found: 4; line 21 pos 0

I believe this is because Databricks' regexp_instr( str, regexp ) function takes only 2 argyuments but is passed 3 in expect_column_values_to_match_regex.

If this needs reporting elsewhere please let me know. Thank you!

clausherther commented 1 year ago

Hi @followingell, thanks for the issue. However, we don't support spark or databricks at the moment, because we don't have a CI testing environment for it. You might want to see if Joe Markiewicz submits a PR for this to the sparks-utils repo, see https://github.com/calogica/dbt-expectations/pull/226 .

followingell commented 1 year ago

@clausherther Thanks for the clarification and links, I'll check there!