Production experience · Feb 2025 to Sep 2026
Claims data platform on Azure Databricks and Snowflake
Molina's claims, member, provider, enrollment and payment data came from more than 20 systems. My job was to get it into one place people could rely on, keep it running, and support the data science teams' models on top of it.
- Role
- Data Engineer
- When
- Feb 2025 to Sep 2026
- Type
- Production experience · Molina Healthcare, through TouchWorld
- Stack
- Azure Databricks, PySpark, Delta Live Tables, Azure Data Factory
Claims, member, provider, enrollment and payment data from 20+ systems is captured with change data capture through Azure Data Factory and Delta Live Tables, lands in Bronze, is validated in Silver with failing rows quarantined, modelled in Gold, merged into Snowflake with streams and tasks, and served to dashboards and reporting. Unity Catalog, Key Vault, Entra ID and Purview govern it; Databricks Workflows orchestrate; Azure Monitor alerts; Terraform and Azure DevOps deploy it.
The problem
The data came from more than 20 systems, each with its own format and schedule, some structured and some not. Refreshes were slow, and because it was health data, every step had to meet HIPAA requirements.
What I built
- Production ETL and ELT pipelines on Azure Databricks, PySpark and Azure Data Factory.
- Metadata-driven pipelines with Delta Live Tables and change data capture, for batch and near real-time ingestion, orchestrated by Databricks Workflows and Data Factory.
- An enterprise lakehouse on ADLS Gen2, Delta Lake and Microsoft Fabric OneLake with Bronze, Silver and Gold layers, governed by Unity Catalog.
- Snowflake solutions with SQL, stored procedures, streams and tasks for incremental processing, and Snowpark (Python) for transformation logic.
- Dimensional models and curated Gold datasets for claims, members, providers and payments.
Supporting the ML lifecycle
- Built feature and training-data pipelines in PySpark and Delta Lake for the data science teams.
- Tracked experiments and versioned models with MLflow tracking and Model Registry.
- Deployed models to serving endpoints with Azure Machine Learning, packaging and releasing model code through Docker and CI/CD.
- Monitored model and data drift in production.
How the lakehouse fed the models
Claims, member, provider, enrollment and payment data from 20+ systems is captured with change data capture through Azure Data Factory and Delta Live Tables, lands in Bronze, is validated in Silver with failing rows quarantined, modelled in Gold, merged into Snowflake with streams and tasks, and served to dashboards and reporting. Unity Catalog, Key Vault, Entra ID and Purview govern it; Databricks Workflows orchestrate; Azure Monitor alerts; Terraform and Azure DevOps deploy it.
Keeping it correct
- Data-quality and reconciliation controls: Great Expectations, schema validation, duplicate detection and business rules.
- Error handling, retries and recovery, with monitoring dashboards and alerting in Azure Monitor and Log Analytics.
- Access secured with managed identities, service principals, Key Vault, Entra ID, RBAC, and VNets with private endpoints.
- Infrastructure and deployments automated with Terraform and Azure DevOps CI/CD.
Results
- End-to-end processing time cut by more than 70% through partitioning, Adaptive Query Execution, Z-Ordering, caching and file optimization.
- Databricks cluster sizing, job compute and autoscaling tuned for cost; Snowflake warehouses right-sized from query history and query profiles.
- Dev, staging and production supported, including production incidents and root-cause analysis.
Making the pipelines faster
On the Molina project, processing time was the bottleneck on every refresh, so I spent a good part of my time on performance.
There wasn't one fix. I repartitioned the data, turned on Adaptive Query Execution, Z-Ordered the most-filtered tables, cached what got reused, and compacted small files. Then I resized the Databricks clusters and set up autoscaling so we weren't paying for compute we didn't use. On the Snowflake side, I used query history and query profiles to right-size the warehouses.
Together, those changes cut end-to-end processing time by more than 70%.
A decision that took longer up front
With data coming from more than 20 systems, writing a separate pipeline for every source wasn't going to scale.
I built the pipelines to run from configuration instead: one framework, using Delta Live Tables and change data capture, with each source described as metadata. It took more design work before anything shipped.
After that, adding a source was a config change rather than new code, which is how the platform reached 20+ sources on one framework.
From the code
Molina's code stays with Molina. This is from my public rebuild of the same pattern on synthetic Synthea patient data: a new source is a config entry, and Silver splits every batch into rows that pass and rows that go to quarantine with the checks they failed.
# Metadata that drives every layer. Adding a source = adding an entry here.
# Columns follow the Synthea CSV export (synthetic patients — no real PHI).
sources:
claims:
file: claims.csv
key: [Id]
columns: [Id, PATIENTID, PROVIDERID, PRIMARYPATIENTINSURANCEID, SERVICEDATE, STATUS1, OUTSTANDING1, DIAGNOSIS1]
types: {SERVICEDATE: timestamp, OUTSTANDING1: "decimal(12,2)"}
rename: {Id: claim_id, PATIENTID: patient_id, PROVIDERID: provider_id, PRIMARYPATIENTINSURANCEID: payer_id, SERVICEDATE: service_ts, STATUS1: status, OUTSTANDING1: outstanding, DIAGNOSIS1: primary_diagnosis}
expectations:
- {name: claim_id_present, rule: "claim_id IS NOT NULL"}
- {name: patient_linked, rule: "patient_id IS NOT NULL"}
- {name: service_date_present, rule: "service_ts IS NOT NULL"}
- {name: outstanding_not_negative, rule: "outstanding IS NULL OR outstanding >= 0"}def latest_per_key(df: DataFrame, key) -> DataFrame:
"""Keep the most recently ingested row per business key, so replays are safe."""
w = Window.partitionBy(*key).orderBy(F.col("_ingested_at").desc(), F.col("_batch_id").desc())
return df.withColumn("_rn", F.row_number().over(w)).where("_rn = 1").drop("_rn")
def apply_expectations(df: DataFrame, source: Source) -> Tuple[DataFrame, DataFrame]:
"""Split rows into (passed, quarantined). Quarantined rows list the checks they failed."""
checks = [F.when(~F.coalesce(F.expr(e["rule"]), F.lit(False)), F.lit(e["name"])) for e in source.expectations]
failed_list = F.filter(F.array(*checks), lambda x: x.isNotNull()) if checks else F.array().cast("array<string>")
flagged = df.withColumn("_failed_checks", failed_list)
passed = flagged.where(F.size("_failed_checks") == 0).drop("_failed_checks")
failed = flagged.where(F.size("_failed_checks") > 0)
return passed, failed
def to_silver(bronze: DataFrame, source: Source) -> Tuple[DataFrame, DataFrame]:
std = standardize(bronze, source)
dedup = latest_per_key(std, source.silver_key)
return apply_expectations(dedup, source)