We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f0e52a0 + cec50c0 commit dbadfe8Copy full SHA for dbadfe8
1 file changed
mimic-iv/buildmimic/sqlite/import.sh
@@ -24,8 +24,9 @@ fi
24
for FILE in */**.csv*; do
25
# skip loop if glob didn't match an actual file
26
[ -f "$FILE" ] || continue
27
- # trim off extension and lowercase file stem (e.g., HELLO.csv -> hello)
28
- TABLE_NAME=$(echo "${FILE%%.*}" | tr "[:upper:]" "[:lower:]")
+ # basename then stem: hosp/ADMISSIONS.csv.gz -> admissions (not hosp/admissions)
+ BASENAME=$(basename "$FILE")
29
+ TABLE_NAME=$(echo "${BASENAME%%.*}" | tr "[:upper:]" "[:lower:]")
30
case "$FILE" in
31
*csv)
32
IMPORT_CMD=".import $FILE $TABLE_NAME"
0 commit comments