Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaces REGEXP_CONTAINS with ~ in pivoted-gcs.sql #119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tnaumann
Copy link
Contributor

@tnaumann tnaumann commented Apr 6, 2020

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

Fixes Issue #117.

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

tompollard commented Apr 10, 2020

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: MIT-LCP/mimic-code#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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants