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
# for two scripts, add a perl replace to cast rounded values as numeric
53
51
if [[ "${tbl}"=="icustay_times" ]] || [[ "${tbl}"=="urine_output" ]];then
54
-
cat "${d}/${tbl}.sql"| sed -r -e "${REGEX_ARRAY}"| sed -r -e "${REGEX_HOUR_INTERVAL}"| sed -r -e "${REGEX_INT}"| sed -r -e "${REGEX_DATETIME_DIFF}"| sed -r -e "${REGEX_DATETIME_TRUNC}"| sed -r -e "${REGEX_SCHEMA}"| sed -r -e "${REGEX_INTERVAL}"| sed -r -e "${REGEX_SECONDS}"| perl -0777 -pe "${PERL_REGEX_ROUND}">>"postgres/${d}/${tbl}.sql"
52
+
cat "${d}/${tbl}.sql"| sed -r -e "${REGEX_ARRAY}"| sed -r -e "${REGEX_HOUR_INTERVAL}"| sed -r -e "${REGEX_INT}"| sed -r -e "${REGEX_DATETIME_DIFF}"| sed -r -e "${REGEX_DATETIME_TRUNC}"| sed -r -e "${REGEX_SCHEMA}"| sed -r -e "${REGEX_INTERVAL}"| sed -r -e "${REGEX_SECONDS}">>"postgres/${d}/${tbl}.sql"
55
53
else
56
54
cat "${d}/${tbl}.sql"| sed -r -e "${REGEX_ARRAY}"| sed -r -e "${REGEX_HOUR_INTERVAL}"| sed -r -e "${REGEX_INT}"| sed -r -e "${REGEX_DATETIME_DIFF}"| sed -r -e "${REGEX_DATETIME_TRUNC}"| sed -r -e "${REGEX_SCHEMA}"| sed -r -e "${REGEX_INTERVAL}"| sed -r -e "${REGEX_SECONDS}">>"postgres/${d}/${tbl}.sql"
57
55
fi
@@ -93,7 +91,7 @@ do
93
91
echo -n "${tbl} .."
94
92
echo"-- THIS SCRIPT IS AUTOMATICALLY GENERATED. DO NOT EDIT IT DIRECTLY.">"postgres/${d}/${tbl}.sql"
95
93
echo"DROP TABLE IF EXISTS ${tbl}; CREATE TABLE ${tbl} AS ">>"postgres/${d}/${tbl}.sql"
96
-
cat "${d}/${tbl}.sql"| sed -r -e "${REGEX_ARRAY}"| sed -r -e "${REGEX_HOUR_INTERVAL}"| sed -r -e "${REGEX_INT}"| sed -r -e "${REGEX_DATETIME_DIFF}"| sed -r -e "${REGEX_DATETIME_TRUNC}"| sed -r -e "${REGEX_SCHEMA}"| sed -r -e "${REGEX_INTERVAL}"| perl -0777 -pe "${PERL_REGEX_ROUND}">>"postgres/${d}/${fn}"
94
+
cat "${d}/${tbl}.sql"| sed -r -e "${REGEX_ARRAY}"| sed -r -e "${REGEX_HOUR_INTERVAL}"| sed -r -e "${REGEX_INT}"| sed -r -e "${REGEX_DATETIME_DIFF}"| sed -r -e "${REGEX_DATETIME_TRUNC}"| sed -r -e "${REGEX_SCHEMA}"| sed -r -e "${REGEX_INTERVAL}">>"postgres/${d}/${fn}"
0 commit comments