eicu-code icon indicating copy to clipboard operation
eicu-code copied to clipboard

Replaces REGEXP_CONTAINS with ~ in pivoted-gcs.sql

Open tnaumann opened this issue 5 years ago • 1 comments

Rewrite REGEXP_CONTAINS(nursingchartvalue, '^[-]?[0-9]+[.]?[0-9]*$') as nursingchartvalue ~ '^[-]?[0-9]+[.]?[0-9]*$' for compatibility with Postgres.

Fixes Issue #117.

tnaumann avatar Apr 06 '20 18:04 tnaumann

Thanks @tnaumann, it looks like BigQuery doesn't support ~ (this raises "Syntax error: Unexpected "~" at [9:30]").

If we are changing to Postgres syntax, then we should also modify things like physionet-data.eicu_crd.nursecharting, but overall we need a better way of dealing with different dialects.

See also the discussion at: https://github.com/MIT-LCP/mimic-code/issues/717. For now, my preference is to do some reorganization to put dialects into different folders.

[Updated!: somehow managed to add the comment midway through writing it]

tompollard avatar Apr 10 '20 21:04 tompollard