Documentation / How to: Pipelines
How to export a vault to a data lake with Apache® Spark
Copy the vault into Delta Lake, Iceberg or Parquet tables and keep them up to date on a schedule.
Before you start
- Who
- Data engineers.
- You need
- pipelines:manage, an Apache Spark server with Spark Connect (see How to run the suite with Apache Spark), and write access for the cluster to the data lake.
Add the pipeline
Pipelines > Egress > Add Egress, then the tile Export to a data lake (Apache Spark). Choose what to export: the raw vault, the golden records or an anonymized vault.Choose the types
All resource types, or a selection, optionally with search criteria.Describe the data lake
Table format (Delta Lake, Apache Iceberg or Parquet), the folder as the cluster sees it, for examples3a://lake/fhir/hospital-a, and whether to keep a table with the current version of every resource.
Export to a data lake: table format, folder, schedule and Spark settings Set the schedule
What the first run exports (current versions, the full history, or nothing), then every 15 minutes, hour or day, or only by hand.Run and follow it
Run now, then follow the jobs under Monitor > Apache Spark servers.
The resultA changes table with every version and every delete, and (with Delta Lake or Iceberg) a current table updated with MERGE. The rows go from PostgreSQL® straight to Spark; the suite stores no storage keys.