You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are few problems with the conversion to postgres using the convert_bigquery_to_postgres.sh which render the created SQL scripts partially broken (some scripts fail while others proceed).
The script does not replace the ROUND statement correctly. More specifically, the regex appears to treat the next sequence of characters up until whitespace as the group to enclose in the brackets, and not the next "token/statement" if that makes sense.
, ROUND( CAST( DATETIME_DIFF(ie.outtimeasnumeric),ie.intime, 'HOUR')/24.0, 2) as los_icu
instead of:
, ROUND( CAST( DATETIME_DIFF(ie.outtime, ie.intime, 'HOUR') asnumeric) /24.0, 2) as los_icu
--- the " as numeric)" ^ instead of here ^ should go here
The script also does not replace the date-parts (YEAR, MONTH etc.) for the function call to DATETIME with its quotemark-encapsulated counterparts. This is currently done for DATETIME_DIFF and DATETIME_TRUNC, but not DATETIME, which is needed by Postgres.
Prerequisites
Description
There are few problems with the conversion to postgres using the convert_bigquery_to_postgres.sh which render the created SQL scripts partially broken (some scripts fail while others proceed).
That results in the following:
mimic-code/mimic-iv/concepts/demographics/icustay_detail.sql
Line 19 in 892c21c
being replaced to:
mimic-code/mimic-iv/concepts/postgres/demographics/icustay_detail.sql
Line 21 in 892c21c
instead of:
YEAR
,MONTH
etc.) for the function call to DATETIME with its quotemark-encapsulated counterparts. This is currently done for DATETIME_DIFF and DATETIME_TRUNC, but not DATETIME, which is needed by Postgres.That results in the following:
mimic-code/mimic-iv/concepts/demographics/icustay_detail.sql
Line 9 in 892c21c
being replaced to:
mimic-code/mimic-iv/concepts/postgres/demographics/icustay_detail.sql
Line 11 in 892c21c
instead of:
mimic_icu.chartevents
instead ofmimiciv_icu.chartevents
.The text was updated successfully, but these errors were encountered: