Skip to content

feat: add MEDS Parquet support and test#26

Merged
tompollard merged 2 commits intomainfrom
feat/add-meds-parquet-support
Nov 26, 2025
Merged

feat: add MEDS Parquet support and test#26
tompollard merged 2 commits intomainfrom
feat/add-meds-parquet-support

Conversation

@rafiattrach
Copy link
Collaborator

feat: Add MEDS Parquet support

Adds Parquet file handler to support MEDS (Medical Event Data Standard) datasets and other Parquet-based formats.

Changes

  • New ParquetHandler using pyarrow for schema-based type inference
  • Added pyarrow dependency
  • End-to-end test with MIMIC-IV MEDS demo dataset

Value

Enables automatic Croissant metadata generation from local Parquet datasets (e.g., MEDS event streams)

Spec Compliance

Closes #20

@rafiattrach
Copy link
Collaborator Author

FYI: MIMICIV MEDS demo taken from here: https://physionet.org/content/mimic-iv-demo-meds/0.0.1/

if not file_path.exists():
raise FileNotFoundError(f"Parquet file not found: {file_path}")

try:
Copy link
Member

@tompollard tompollard Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just move these to the top.

(If pyarrow is a dependency of the package it will be installed anyway. If it is not a dependency, we probably want it to be).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, fixed!

"num_rows": num_rows,
"num_columns": len(columns),
"columns": columns,
"sample_data": [], # Avoid reading data; schema-only for lean operation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a good idea to load sample_data here for consistency with other handlers?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need it in other handlers, so I removed it here for now since its not needed here but I will perhaps refactor in a separate PR and try to also remove it in other handlers to reduce the memory load and make it more consistent

@tompollard tompollard merged commit 70865ac into main Nov 26, 2025
3 checks passed
@tompollard tompollard deleted the feat/add-meds-parquet-support branch November 26, 2025 22:19
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

Successfully merging this pull request may close these issues.

Add support for the Medical Event Data Standard (MEDS)

2 participants