Search Shortcut cmd + k | ctrl + k
healthkit_export

Read Apple Health app exports (HealthKit export.zip / export.xml) as typed DuckDB tables (records, workouts, activity rings, workout routes and GPX points).

Maintainer(s): Mjboothaus

Installing and Loading

INSTALL healthkit_export FROM community;
LOAD healthkit_export;

Example

-- After INSTALL healthkit_export FROM community; LOAD healthkit_export;
-- Use a Health app export.zip (or test fixture path when developing from source)
SELECT type_short, count(*) AS n
FROM read_healthkit_export('export.zip')
GROUP BY 1
ORDER BY n DESC
LIMIT 10;

About healthkit_export

healthkit_export is a DuckDB scanner for exports produced by the Apple Health app (HealthKit export.zip / export.xml). Written in C on DuckDB's stable C API (extension-template-c).

Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple, Apple Health, and HealthKit are trademarks of Apple Inc.

Table functions

  • read_healthkit_export(path) — top-level Health records
  • healthkit_workouts(path) — workouts
  • healthkit_activity_summaries(path) — daily activity rings
  • healthkit_workout_routes(path) — route metadata + GPX path
  • healthkit_workout_route_points(path) — GPX track points

path may be export.zip, a directory containing export.xml, or export.xml itself.

Design notes

Large exports are a full scan (first pass can be memory-heavy). Prefer materialising slices with COPY … TO '….parquet' for day-to-day analytics.

Top-level <Record> only — nested Correlation children are skipped (same samples usually also appear top-level).

Platform

Initial community builds target macOS (Apple Silicon / Intel). Other platforms may follow once CI is green.

Rename note

This listing replaces the short-lived apple_health community id (unintended branding). Use INSTALL healthkit_export FROM community going forward.

Source

https://github.com/Mjboothaus/duckdb-healthkit-export — optional Python helpers in-repo are not part of this extension binary.

Added Functions

function_name function_type description comment examples
healthkit_activity_summaries table NULL NULL  
healthkit_workout_route_points table NULL NULL  
healthkit_workout_routes table NULL NULL  
healthkit_workouts table NULL NULL  
read_healthkit_export table NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

This extension does not add any settings.