Introduction
Large Observational Databases (LODs), such as the French National Health Data System (SNDS), provide an unprecedented view of public health, covering nearly 99% of the French population. However, these databases are primarily designed for administrative and billing purposes rather than scientific research. They typically utilize highly normalized "star schemas" that require computationally expensive join operations across hundreds of tables for even basic queries. Existing proprietary tools like SAS and Oracle often struggle to scale with the massive volume of data—approximately 70TB for the SNDS—and lack the transparency and integration needed for modern machine learning workflows.
System Architecture
To address these challenges, the authors developed SCALPEL3 (SCAlable Pipeline for hEaLth data), an open-source framework built on Apache Spark. SCALPEL3 reimagines the ETL process through a three-tiered architecture designed for scalability and reproducibility.
The pipeline consists of three primary components:
- SCALPEL-Flattening: This stage denormalizes the database into a single flat table "once and for all." By using Apache Parquet, a columnar storage format, the system achieves high compression and avoids the need for repeated, expensive joins during analysis.
- SCALPEL-Extraction: This layer transforms raw data into standardized "Patient" and "Event" objects. It uses "Extractors" for raw data retrieval and "Transformers" to synthesize complex medical concepts, such as drug exposure periods.
- SCALPEL-Analysis: A Python/PySpark API enables interactive cohort manipulation within Jupyter notebooks. A dedicated
FeatureDriverfacilitates the export of data into formats compatible with NumPy, TensorFlow, and PyTorch.
Data Processing and Efficiency
The core efficiency of SCALPEL3 stems from its use of columnar storage and distributed computing. By leveraging "column sparsity," the system can perform near-instantaneous projections, reading only the specific columns required for a study.
As shown in the extraction workflow, the process involves three main steps:
- Step 1 (Projection): Fetching relevant columns is a fast columnar operation.
- Step 2 (Filtering): Null values are filtered out quickly by leveraging column sparsity.
- Step 3 (Conversion): The output is converted to the standardized Event schema.
Optional row-based filtering can be applied, though it is computationally slower than columnar operations. This tiered approach ensures that the most data-intensive parts of the pipeline are handled with maximum efficiency.
Performance and Scalability
The framework was benchmarked using a subset of the SNDS containing 13.7 million patients. Key findings include:
- Horizontal Scalability: SCALPEL3 demonstrated near-linear scaling; increasing Spark executors from 4 to 16 significantly reduced processing time across various tasks.
- Legacy Comparison: SCALPEL3 outperformed traditional SAS-Oracle infrastructures on complex tasks, such as extracting demographics and drug dispenses.
- Interactive Capability: Cohort operations, such as finding intersections between populations, were completed in approximately 11 seconds, enabling feasible interactive exploration of millions of records.
Discussion and Future Work
While SCALPEL3 offers significant advantages, certain limitations remain. The flattening strategy is highly effective for sparse outpatient data but less efficient for dense hospital records. Future optimizations may include "block-sparsity" techniques. Additionally, while the system is designed for interoperability, native support for international standards like OMOP-CDM or FHIR is still under development. Finally, the transition from Parquet to Apache ORC is being considered to further enhance compression and performance.
By providing a transparent, version-controlled, and scalable alternative to proprietary stacks, SCALPEL3 represents a significant step forward in making massive healthcare datasets accessible for high-impact public health research.
Summary updated