Error: Import the CSV data files into the empty tables
Hello,
I got an error message while running the script to import the CVS data file into the empty tables (step 6 of the manual - Installing MIMICIII in a local Prostgres database-Mac).
I was running the script:
psql -f postgres_load_data.sql -U mimic -v mimic_data_dir=MYDIRECTORY
This is the error message. (showed after long time)
Password for user mimic: SET COPY 58976 COPY 34499 COPY 7567 psql:postgres_load_data.sql:51: ERROR: invalid input syntax for type timestamp: "2182-12-14 0" CONTEXT: COPY chartevents, line 191065468, column charttime: "2182-12-14 0"
Thanks in advance for your help!
You able to pop into MYDIRECTORY and run the following please?
md5sum -c checksum_md5.txt
Specifically, does the line for CHARTEVENTS say OK?
Thanks for raising the issue here Ramiro (@rbravos). We aren't aware of any build issues with v1.4 in Postgres, so it would be great if you could respond to Jim's question, which will check whether the file that you are trying to import is identical to the file that we have provided on PhysioNet.
Hi Jeblundell, thank you for your reply and help!
I have two .txt files in MYDIRECTORY "checksum_md5_zipped.txt" and "checksum_md5_unzipped.txt".
For:
$ md5 checksum_md5_zipped.txt The result: MD5 (checksum_md5_zipped.txt) = d770603edf04673725e262ee530f005c
$md5 checksum_md5_unzipped.txt The Result: MD5 (checksum_md5_unzipped.txt) = ecc734046940292efae4aa0e8cb09b43
Inside the checksum_md5_unzipped.txt:
I57d940b69dd066da5ba57e008cc7f92c output/ADMISSIONS.csv cd4e416337e68f6678ff4e091938be58 output/CALLOUT.csv 258e3c2bc11798c99ffc4f33aa1e9bcd output/CAREGIVERS.csv 2b5211d1045ffac4c4e345ccb56ccc1b output/CHARTEVENTS.csv bf32e07ecd2b946a675a0d7cea75d2e7 output/CPTEVENTS.csv 6245f2f4f581dce8e05e147228a51522 output/DATETIMEEVENTS.csv 49fdda583f5e85e5e0a92686b3106fac output/D_CPT.csv e2c0a05d768a6273038ae84e576186a7 output/DIAGNOSES_ICD.csv d0a7026ca3618f4360d8329643d9041d output/D_ICD_DIAGNOSES.csv a9707e5361f939f45ca2bc2eb8bd5652 output/D_ICD_PROCEDURES.csv 749e350c22531ec8589b7391b4e7b660 output/D_ITEMS.csv 2f77db8fc2f2a21e4fad1a1781d98709 output/D_LABITEMS.csv ea61c7dfe180c6d6a1273f220b5e70c5 output/DRGCODES.csv b2a57affcda3c60fa38a022b2df7fcf2 output/ICUSTAYS.csv 5fce8501d6723a470c74affcda32e52b output/INPUTEVENTS_CV.csv 4d57864670f51e7230c0fef52d206049 output/INPUTEVENTS_MV.csv f1131f43aeb5b225e7106db34e729b4a output/LABEVENTS.csv 0a35833252bdecb32b9d1348adec2085 output/MICROBIOLOGYEVENTS.csv df33ab9764256b34bfc146828f440c2b output/NOTEEVENTS.csv 6e137e00d7a7fd14c291d015573ed375 output/OUTPUTEVENTS.csv 3b06f45153c66e2b7c49b35805971145 output/PATIENTS.csv 43f469da09c65bae252d02a51787ad85 output/PRESCRIPTIONS.csv 8a73340cf7a09d8f42ddd64f4863fff3 output/PROCEDUREEVENTS_MV.csv ed7e6f1efa7e334404f6fb26e4c3c7d2 output/PROCEDURES_ICD.csv 52259c657c4fd4bc43bcb35ec5c96d98 output/SERVICES.csv 136b75c89bec2aab588ca64cd4b582bd output/TRANSFERS.csv
@tompollard thanks for following up.
Thanks!
@rbravos the checksum files that you are using appears to be outdated. Please could you download new versions of the two checksum files (checksum_md5_unzipped.txt and checksum_md5_zipped.txt) from the MIMIC-III project on PhysioNet?
Then please run one of the following commands, depending on whether you have the zipped or unzipped CSV files in your folder:
md5sum -c checksum_md5_unzipped.txt
or
md5sum -c checksum_md5_zipped.txt
This will allow us to check whether there is a problem with the files that you have downloaded.
The command that you ran (md5 checksum_md5_zipped.txt) does not give us the information we need, because you are creating a new hash of the checksum_md5_zipped.txt file, rather than running a check on the file contents.
Assuming the problem is solved, re-open if otherwise.
Yes, I used command md5 checksum_md5_zipped.txt and everything is OK.