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

Error loading MIMIC-IV 3.0 with the V 2.2 postgres create.sql script #1770

Open
PetrarcaBruto opened this issue Jul 29, 2024 · 3 comments
Open

Comments

@PetrarcaBruto
Copy link

Prerequisites

Description

Description of the issue, including:

  • The admissions.csv in version 3.0 has values for too long for the 'language' column. This causes the load.sql script to fail:
  • SET
    psql:load.sql:16: ERROR: value too long for type character varying(10)
    CONTEXT: COPY admissions, line 238, column language: "Kabuverdianu"
    and later with
    psql:load_admissions.sql:16: ERROR: value too long for type character varying(12)
    CONTEXT: COPY admissions, line 387, column language: "American Sign Language"

I fixed it by changing the 'language' column VARCHAR limit to 30. This will surely be fixed if and when a 3.0 version of code is released.

@ooaaiixx
Copy link

I came across a similar error with COPY admissions.
Could you tell me how you fixed the problem in detail? I don't know how to change the the 'language' column VARCHAR limit.
Thank you.

@PetrarcaBruto
Copy link
Author

The exact fix is to change the create_admissions.sql file. I my case the location is mimic-code\mimic-iv\buildmimic\postgres\create_admissions.sql (I am working with postgres on Windows 11).
In that file, change the line that starts with language to language VARCHAR (30) and build the database again.

@alistairewj
Copy link
Member

Yep that works! Or run alter table mimiciv_hosp.admissions alter column language type varchar(25); before you run the load script. Hopefully we push fixes soon :)

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

No branches or pull requests

3 participants