tuva-health / tuva

Main repo including core data model, data marts, reference data, terminology, and the clinical concept library
https://thetuvaproject.com/
189 stars 49 forks source link

Update apply_regex.sql #544

Closed dprovder closed 3 months ago

dprovder commented 3 months ago

fix for runtime error when running hcc_suspecting__int_prep_egfr_labs using duckDB

Describe your changes

added apply_regex implementation for duckDB to fix

Runtime Error in model hcc_suspecting__int_prep_egfr_labs (models/hcc_suspecting/intermediate/hcc_suspecting__int_prep_egfr_labs.sql)
  Catalog Error: Scalar Function with name regexp_like does not exist!
  Did you mean "regexp_replace"?
  LINE 79:     where regexp_like(result, '^[+-]?([0-9]*[.])?[0-9]+$')

How has this been tested?

running dbt build with a profile that uses the dbt-duckDB adapter:

locally tested & So did @sarah-tuva

Checklist before requesting a review

Package release checklist

(Optional) Gif of how this PR makes you feel

Loom link

sarah-tuva commented 3 months ago

Resolves #536 and previously tested locally by @eldon-tuva.

sarah-tuva commented 3 months ago
github-actions[bot] commented 3 months ago

Workflow has finished with the following statuses: