The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 5 new columns ({'247710', '2103-01-14 05:30:00', 'cephalexin.1', '0', 'cephalexin'}) and 1 missing columns ({'path\tsize_bytes\tsha256\thosting'}).
This happened while the csv dataset builder was generating data using
hf://datasets/JimHue/EHRSQL_PostgreSQL_data/postgres_import/eicu/csv/allergy.csv (at revision 1e735fcd2e57b87105a518cfc9c49f902b72f2c2), ['hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/data_artifacts_manifest.tsv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/allergy.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/cost.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/diagnosis.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/intakeoutput.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/lab.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/medication.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/microlab.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/patient.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/treatment.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/vitalperiodic.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/ADMISSIONS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/CHARTEVENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/COST.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/DIAGNOSES_ICD.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/D_ICD_DIAGNOSES.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/D_ICD_PROCEDURES.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/D_ITEMS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/D_LABITEMS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/ICUSTAYS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/INPUTEVENTS_CV.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/LABEVENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/MICROBIOLOGYEVENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/OUTPUTEVENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/PATIENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/PRESCRIPTIONS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/PROCEDURES_ICD.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/TRANSFERS.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
writer.write_table(table)
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
self._write_table(pa_table, writer_batch_size=writer_batch_size)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
pa_table = table_cast(pa_table, self._schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
0: int64
247710: int64
cephalexin: string
cephalexin.1: string
2103-01-14 05:30:00: string
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 870
to
{'path\tsize_bytes\tsha256\thosting': Value('string')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
...<4 lines>...
)
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 5 new columns ({'247710', '2103-01-14 05:30:00', 'cephalexin.1', '0', 'cephalexin'}) and 1 missing columns ({'path\tsize_bytes\tsha256\thosting'}).
This happened while the csv dataset builder was generating data using
hf://datasets/JimHue/EHRSQL_PostgreSQL_data/postgres_import/eicu/csv/allergy.csv (at revision 1e735fcd2e57b87105a518cfc9c49f902b72f2c2), ['hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/data_artifacts_manifest.tsv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/allergy.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/cost.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/diagnosis.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/intakeoutput.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/lab.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/medication.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/microlab.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/patient.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/treatment.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/eicu/csv/vitalperiodic.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/ADMISSIONS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/CHARTEVENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/COST.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/DIAGNOSES_ICD.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/D_ICD_DIAGNOSES.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/D_ICD_PROCEDURES.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/D_ITEMS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/D_LABITEMS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/ICUSTAYS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/INPUTEVENTS_CV.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/LABEVENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/MICROBIOLOGYEVENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/OUTPUTEVENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/PATIENTS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/PRESCRIPTIONS.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/PROCEDURES_ICD.csv', 'hf://datasets/JimHue/EHRSQL_PostgreSQL_data@1e735fcd2e57b87105a518cfc9c49f902b72f2c2/postgres_import/mimic_iii/csv/TRANSFERS.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
path size_bytes sha256 hosting string |
|---|
eicu.sqlite 106176512 603463940a791912f9c552c31d65eace0657dbc5fe576ff0730b458d140f6f3e huggingface |
mimic_iii.sqlite 98848768 a5d6041a3f6e9d09de7236d763d459b3480de3a10ef058812ab709a9743b908a huggingface |
postgres_import/eicu/csv/allergy.csv 79955 8ab34930310c9dc5e38650da9f353c53f35ca24a1bb7f214974a65e50ec23388 huggingface |
postgres_import/eicu/csv/cost.csv 18517083 08b14a1bae0cb82f4be397b1d2aa92dbbc8e3c7c1d220cb7ae50ab9406ceff7d huggingface |
postgres_import/eicu/csv/diagnosis.csv 1293492 aaf7a6a8081376fb38f277038764673692d7078366e683b40d183500bb0a2b48 huggingface |
postgres_import/eicu/csv/intakeoutput.csv 9124785 b175af130d2308e741816ffc45063157174e2cb2bbd36d229943dbcf147f5473 huggingface |
postgres_import/eicu/csv/lab.csv 10799660 1bfec2287fdf14b9f5b6e25116fd07e54ad5699d6d496564bfbe4eb09594df94 huggingface |
postgres_import/eicu/csv/medication.csv 2627595 1013d08e6898332b4f78e82b78ce826aebd1c2c41009ab24552e57e55754a59b huggingface |
postgres_import/eicu/csv/microlab.csv 3689 77d5583ed89b74c55327ef17e45b41a5c3a7b39035caa32f86558a1a4d9e96cf huggingface |
postgres_import/eicu/csv/patient.csv 225486 107afd0fdd5f69720de62ca50129c80a58e93e89cb9c7a9eb0f947e6674a32eb huggingface |
postgres_import/eicu/csv/treatment.csv 1410524 b5549e871e845fd485239ca0b499513ba2dcf1ca77c7ce2854c448cca3525640 huggingface |
postgres_import/eicu/csv/vitalperiodic.csv 48140150 3f9b2c35975c7ec46a0c88f2383709388430e8136103047d1be1b0c7f6759adc huggingface |
postgres_import/mimic_iii/csv/ADMISSIONS.csv 167583 aea0767df859ea142b7873ac5acf46eb6d9244df25fadcfc167df73f4a401dd5 huggingface |
postgres_import/mimic_iii/csv/CHARTEVENTS.csv 13818195 93c91749aec40d832df66eb98742331a30ac7ec04de1888b89136d3fc0a73810 huggingface |
postgres_import/mimic_iii/csv/COST.csv 28542632 31821224418d39e119b76e720f20ec9591486ac27dfbeed85e6968a2b7b735f5 huggingface |
postgres_import/mimic_iii/csv/DIAGNOSES_ICD.csv 602203 fe066cc2784d8ab5517f15985cbdb03cda262372725c55021bed6697b5cf71a1 huggingface |
postgres_import/mimic_iii/csv/D_ICD_DIAGNOSES.csv 1313134 dacbf223af451a430b0e04698adc7a023e1b78225879c6a60cb8ca98304f6146 huggingface |
postgres_import/mimic_iii/csv/D_ICD_PROCEDURES.csv 284597 4560cb12148d91af46a8a6908498bf0c0dbad795723b65c204b88f677e264b4d huggingface |
postgres_import/mimic_iii/csv/D_ITEMS.csv 448606 39157436700222efcf1f9895c7a22a5faba7d6dd4f218dce5feefeb1fd49cbf8 huggingface |
postgres_import/mimic_iii/csv/D_LABITEMS.csv 18587 72b112f0d322f60204fe6de3e7bdcbbabc300a7b3060203f6dde5b173098e750 huggingface |
postgres_import/mimic_iii/csv/ICUSTAYS.csv 100274 ddf031f8bd2ea0d908cec13cadad0781edf6724e2f2d309a0fd63c54921f4218 huggingface |
postgres_import/mimic_iii/csv/INPUTEVENTS_CV.csv 5860910 38447df884c094acc2af90cb0985da115b6101e0bea646dcbf9e943b17412e84 huggingface |
postgres_import/mimic_iii/csv/LABEVENTS.csv 20369050 29fbf2f1bdfecf76301df0254fc93683cb9dc0c068d6bd1efb96da535af94194 huggingface |
postgres_import/mimic_iii/csv/MICROBIOLOGYEVENTS.csv 689292 69eca3dd4b5b9418bfd1ca060d7d7a981f6d5a7b125f07a70a1b73b5d0ccc230 huggingface |
postgres_import/mimic_iii/csv/OUTPUTEVENTS.csv 4513425 83510ed0057643344f4ebff61f275864cbac1269fcbc8c299aa54e3827b42b99 huggingface |
postgres_import/mimic_iii/csv/PATIENTS.csv 38464 d2d021928c14d41073532c741ea9276e8dec3cb5e7ff068d51ba15aba6c9206f huggingface |
postgres_import/mimic_iii/csv/PRESCRIPTIONS.csv 6357605 0989cd558fdf305ed5f76ede106ecb5845a8b6226793438fbc508deca98e0b0b huggingface |
postgres_import/mimic_iii/csv/PROCEDURES_ICD.csv 190910 33d9651269692bf7dcc93f366d1698d5f5970d6133f4fe6fc5aa51410b0aead5 huggingface |
postgres_import/mimic_iii/csv/TRANSFERS.csv 380628 fe19c1246fc883381ee3c8be2dfca70bfe65cbc7d880cb022e51f5def2f36183 huggingface |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
null |
EHRSQL PostgreSQL Artifacts
This dataset repository hosts database artifacts generated for the companion GitHub repository:
https://github.com/Jensen-JinhuiLiu/EHRSQL_PostgreSQL
Files
eicu.sqlite: original benchmark SQLite database artifact used for eICU.mimic_iii.sqlite: original benchmark SQLite database artifact used for MIMIC-III.postgres_import/eicu/csv/: CSV exports for loading the eICU PostgreSQL database.postgres_import/mimic_iii/csv/: CSV exports for loading the MIMIC-III PostgreSQL database.
The companion GitHub repository contains the preprocessing scripts, PostgreSQL schema/load files, generated benchmark JSON files, and a checksum manifest for these artifacts.
Download
Download directly into the companion GitHub repository root:
hf download JimHue/EHRSQL_PostgreSQL_data --repo-type dataset --local-dir .
Or clone this dataset repository separately:
git clone https://huggingface.co/datasets/JimHue/EHRSQL_PostgreSQL_data
Loading PostgreSQL
After downloading the artifacts into the GitHub repository root, follow:
postgres_import/README.mdpostgres_import/create_databases.sqlpostgres_import/eicu/schema_no_fk.sqlpostgres_import/eicu/load_data.sqlpostgres_import/mimic_iii/schema_no_fk.sqlpostgres_import/mimic_iii/load_data.sql
Attribution
These artifacts are derived from the EHRSQL benchmark:
EHRSQL: A Practical Text-to-SQL Benchmark for Electronic Health Records https://github.com/glee4810/EHRSQL
- Downloads last month
- 25