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

MIMIC-III database loaded without the CHARTEVENTS table #182

Closed
postgres-newbie opened this issue Feb 28, 2017 · 6 comments
Closed

MIMIC-III database loaded without the CHARTEVENTS table #182

postgres-newbie opened this issue Feb 28, 2017 · 6 comments

Comments

@postgres-newbie
Copy link

Hi !

When downloading the MIMIC-III dataset, my internet connection was interrupted during this command:

wget --user username@domain.com --ask-password -A csv.gz -m -p -E -k -K -np -nd https://physionet.org/works/MIMICIIIClinicalDatabase/files/

As a result of this the CHARTEVENTS.csv.gz file was not downloaded. I resumed the download using the same command:

wget --user username@domain.com --ask-password -A csv.gz -m -p -E -k -K -np -nd https://physionet.org/works/MIMICIIIClinicalDatabase/files/

But it did not download CHARTEVENTS.csv.gz, so I manually downloaded this file.

When loading the MIMIC III data loaded without the CHARTEVENTS table and gave no error during processing:

$ psql -f postgres_load_data.sql -U mimic -v mimic_data_dir='/Documents/MIMIC_III/'

SET
COPY 58976
COPY 34499
COPY 7567
COPY 0 <--- CHARTEVENTS
COPY 573146
COPY 4485937
COPY 651047
COPY 125557
COPY 134
COPY 14567
COPY 3882
COPY 12487
COPY 753
COPY 61532
COPY 17527935
COPY 3618991
COPY 27854055
COPY 631726
COPY 2083180
COPY 4349218
COPY 46520
COPY 4156450
COPY 258066
COPY 240095
COPY 73343
COPY 261897

Here's the configuration of my machine:
MacBook Air (13-inch, Early 2014)
Processor: 1.7 GHz Intel Core i7
Memory: 8 GB 1600 MHz DDR3
Mac OS: Sierra, version 10.12.3
MIMIC-III version 1.4

The CHARTEVENTS.csv file was located along with all the other .csv files in the mimic_data_dir location. Has anyone else had this issue?

@tompollard
Copy link
Member

@postgres-newbie the chartevents table is distributed across several partitions, resulting in a 0 value being reported here. If you try querying the table, you'll find that it returns the expected data.

SELECT COUNT(*)
FROM chartevents;

   count   
-----------
 330712483
(1 row)

@postgres-newbie
Copy link
Author

Thanks so much for your help Dr. Pollard!

@tompollard
Copy link
Member

Thanks Krupa - glad we could help!

@jbains223
Copy link

Hi @tompollard. If the result is not 0 and rather the number 330712483 does that mean that the make was not performed successfully?

@alistairewj
Copy link
Member

Run the checks script - whether it's printed as COPY 0 or COPY 330712483 likely depends on the postgres version - so the row count is the best check.

@jbains223
Copy link

Thank you @alistairewj. I ran the make file which did the check at the end and all the tables PASSED.

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

No branches or pull requests

5 participants