Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
FREEDOM251

Freedom251 › Blog › Apple Health

How to Query Fitness Exports with DuckDB and dbt Locally

By Freedom251 Team · · 5 min read

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Turn fitness exports into repeatable, queryable tables with DuckDB and dbt—without needing a hosted warehouse. DuckDB can run embedded in memory or in a local database file; dbt provides the layer for organizing transformations into reusable models. “Serverless” here means you can avoid managing a database server, not that the local setup runs in the cloud.

What the setup does—and what it does not

Fitness history is often split across apps and devices. An export gives you files you can keep and analyze; DuckDB reads or stores the data, and dbt turns it into documented transformations you can rerun when you add another export.

As an Amazon Associate I earn from qualifying purchases.

This workflow is based on files rather than a live connection to a fitness service. The documented Apple Health and Garmin paths below read exports; they do not establish automatic account syncing. You do not need to buy a wearable or create a hosted warehouse account to follow the local path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose where DuckDB runs

Choice Where data is processed When it fits
Embedded DuckDB In memory or in a local database file on your machine Start here for an individual, local-first workflow.
MotherDuck connection Hosted connection documented as an option for dbt and DuckDB Consider it if you specifically want hosted access; it is optional, not a requirement.

The dbt setup documentation describes both local and MotherDuck connection options. DuckDB also documents reading from files, cloud storage, and databases, including CSV, JSON, Parquet, S3-compatible storage, Azure Blob Storage, Cloudflare R2, MySQL, PostgreSQL, and SQLite. These capabilities give you room to expand later; none is required for a local export-based start.

#1 Best Overall
Sale
USMECBL Fitness Trackers,Heart Rate Blood Oxygen Sleep Monitor,1.47‘’ OLED Display,Calorie Pedometer Steps Counter Activity watchs,Smart Band 24/7 Health Monitoring(Black)
  • 【25 Sports Modes & Smart Activity Tracking】Track virtually any activity with 25 built-in modes (running, swimming, yoga, etc.). It automatically records your steps, distance, and calories burned. The built-in stopwatch helps you time your workouts precisely, helping you crush your fitness goals.
  • 【 Universal Compatibility & Stable Connection】Works seamlessly with both iOS and Android smartphones. Receive call, text, and app notifications (SNS) reliably on your wrist. The Bluetooth connection is stable, so you stay connected without constantly re-pairing.
  • 【Comfortable, Lightweight & IP68 Waterproof】Crafted for all-day comfort. The lightweight, skin-friendly band feels like a natural part of you, even while sleeping. With an IP68 rating, it's resistant to rain, sweat, and you can wear it while swimming or showering without worry.
  • 【24/7 Accurate Health Monitoring】Keep a close eye on your well-being with all-day automatic heart rate tracking, detailed sleep stage analysis (deep, light, awake), blood oxygen (SpO2) saturation monitoring, and advanced blood pressure data. Gain valuable insights into your body's patterns and make informed decisions about your health.
  • 【10-14 Day Long Battery Life – Wear It Day and Night】Forget daily charging anxiety. A single, full charge powers up to 7 days of continuous use. Monitor your sleep seamlessly every night and enjoy worry-free weekends or travel without carrying a charger. Running watch Regular use up to 10-14 days, standby for 30 days.

Check the dbt route before building

Use the interface and product generation that match the setup you intend to run. The dbt v2 supported-platform page lists DuckDB as generally available for the CLI only, and notes that adapter lifecycle differs between local development and the dbt platform. Do not assume all dbt interfaces behave interchangeably.

The current dbt DuckDB setup page also flags two practical limits: the bundled driver does not support loading DuckDB extensions, and static analysis can have issues when models reference local CSV, Parquet, or JSON files through DuckDB file-reading functions. If your workflow needs an extension or direct file reads, follow the setup page’s system-installed-driver guidance and check the behavior for your version.

Rank #2
Fitness Tracker with 24/7 Heart Rate Blood Oxygen Sleep Monitor,Activity Tracker with 1.1" AMOLED Touch Color Screen, Multiple Sport Modes Step Counter,IP68 Waterproof for Women Men (Dark Black)
  • 【24H Health Monitoring】Fitness Tracker With the function of monitoring heart rate and blood oxygen, you can track your health data 24/7 and help adjust your overall condition.The sleep tracker also analyzes your sleep quality, tracks your deep sleep, light sleep, and awake periods, rates your sleep quality, and helps you adjust your sleep habits.
  • 【All Day Activity Tracking】The fitness tracker can automatically tracks your steps, distance and calories burned.Accurately record all-day activities and give professional analysis on improving your sports and daily habit.
  • 【1.1" AMOLED Color Touchscreen】The fitness tracker showcases a sleek curved design and boasts a 1.1" AMOLED color touchscreen, enhancing your visual and operational experience. Choose from our extensive collection of 70+ cloud-based watch faces to personalize your device according to your preferences, mood, or outfit. Moreover, you can customize your favorite photos in the album as a unique dial to show your unique style and theme every day.
  • 【25 Sport Modes】The digital watch offers over 20 sports modes, covering almost all your daily physical activities.Inclued walking, running, cycling, indoor running, free training, etc. Store the last 5 exercise records,helping you exercise and train more effectively.
  • 【Smart Message Notification】The watch can receive Social software message notifications from mobile phones, including SMS, QQ, WeChat, WhatsApp, Facebook and Twitter, etc. Also can receive incoming call notifications and reject calls. so you never miss an important call or message.

Build a small local project from one export

Start with one export and a local DuckDB target. The exact dbt project commands depend on your installed dbt generation and environment; use the current DuckDB setup instructions for the CLI-only route rather than copying commands for a different interface.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Prepare an export. Obtain an export from the service you already use and keep the original files unchanged. For Apple Health, the community healthkit_export extension reads export.zip or export.xml. For Garmin activity files, the community fit extension reads .fit files.
  2. Configure DuckDB locally. Choose an in-memory database for a temporary session or a local database file for a persistent working database. Keep the database and input files in locations you can back up.
  3. Make the raw data accessible. Follow the DuckDB/dbt setup appropriate to your version. If using a community extension, confirm that it is compatible and available through your chosen driver; the bundled dbt driver does not load DuckDB extensions.
  4. Create staging models. Make a model for each raw table or export input, with clear names and only straightforward cleanup at first. Preserve source fields while you establish what they mean.
  5. Build a canonical activity model. Map source records into a consistent shape, such as activity date, duration, distance, and source. Treat this as a design choice, not a guarantee that platforms use identical definitions or units.
  6. Add an aggregate only after checking the base model. A weekly activity-volume model or a summary by activity type can be useful, but confirm the underlying dates, units, and event definitions before combining platforms.

Apple Health and Garmin are file-ingestion options

The DuckDB Community Extensions listing describes healthkit_export as producing typed tables for records, workouts, activity rings, workout routes, and GPX points from an Apple Health export. It is a community extension maintained by Mjboothaus, not a DuckDB core feature.

Rank #3
SAMSUNG Galaxy FIT 3 [2025, 40MM] 1.6" AMOLED Display | IP68 Water Resistant | 14 Days Battery Life | 100+ Watchfaces | 100+ Exercise Modes | International Model (Fast Charger Bundle, Black)
  • Vibrant 1.6” AMOLED Display – Large, high-res screen with smooth touch for easy navigation
  • 5ATM & IP68 Water Resistance – Swim-ready and dust-resistant for active lifestyles
  • Up to 14 Days Battery Life – Powerful 208mAh battery for long-lasting performance
  • 101+ Workout Modes with Auto Detection – Automatically tracks common workouts for seamless fitness tracking. Advanced Health Tracking – Includes sleep coaching, SpO2, heart rate, and snore detection
  • International Model No Warranty in the US. ONLY compatible with Android devices. Samsung Pay - Not Supported. NOT compatible with iPhone or iOS devices.

The community fit extension exposes records, activities, sessions, laps, and device information from Garmin .fit files. These extensions broaden the file inputs you can work with; they do not provide evidence of a live connection to Apple Health or Garmin accounts. Check their compatibility and installation instructions before using them.

Validate meaning, not just whether a query runs

A successful build proves that the transformation executed, not that two vendors’ measurements mean the same thing. Before trusting an aggregate, inspect sample records and check the source field definitions, units, time zones, and date boundaries.

Rank #4
Xiaomi Mi Smart Band 10 (2025) Global Version - 1.72" AMOLED Display | 21 Days Battery Life | Touchscreen, Multi-Sport Tracker, Activity Tracker, Heart Rate Monitor | BT5.4 - (Midnight Black)
  • Stunning images, smooth touch: Immerse yourself in brilliant clarity with the large 1.72-inch AMOLED display.Vacuum filling sealing technology enables symmetrical 2.0mm ultra-thin bezels, expanding screen-to-body ratio from 66% to 73%. Enjoy incredibly smooth and seamless interaction with crisp, color-accurate images, right on your wrist.
  • Fast charging, longer adventures: Say goodbye to daily charging hassles! Enjoy an exceptional 21 days of battery life on a single charge. And when you need more power, it only takes an hour to fully recharge the device with fast charging. Freedom without limits!
  • Revolutionize your swimming and training sessions: The Xiaomi smartwatch is equipped with a new high-precision electronic compass that tracks swimming direction like never before, delivering unparalleled accuracy for pool sessions. Plus, gain detailed insights through professional analysis of your workouts to optimize each session.
  • Master your nighttime recovery: Discover the secrets of your sleep with comprehensive and enhanced sleep monitoring. Get comprehensive insights into your sleep stages and quality, helping you wake up refreshed and optimize your well-being.
  • 1500 nits HBM brightness,Glanceable in any light:25% brighter than before, the display achieves a remarkable 1500 nits HBM brightness, making every message readable even in direct sunlight.
  • Compare input and staging row counts to catch missing or duplicated records.
  • Inspect the earliest and latest dates in each source to ensure the expected export range arrived.
  • Check distance and duration values against several original records, including any unit conversions.
  • Verify how workouts, activities, laps, and other event types are represented before combining them.
  • Run the same models after adding an export and confirm that previously loaded history remains intact.

Direct references to local flat files can also be affected by dbt’s static-analysis limitations. If analysis reports a problem even though a DuckDB file-reading function is valid in your environment, consult the version-specific setup guidance and test the actual model behavior rather than treating static analysis as proof that the data is correct.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Add external files or hosted access only if needed

Once the local model works, you can decide whether to keep reading files in place, move them to cloud storage, or use a hosted DuckDB connection. DuckDB documents sources including S3-compatible storage, Azure Blob Storage, and Cloudflare R2, as well as relational databases. The dbt-duckdb README describes MotherDuck connection strings and fsspec-backed storage paths.

Best Value
Google Fitbit Air - Screenless Activity Tracker, Obsidian | Fitness, heart rate, & sleep tracking, personalized AI-powered coaching, up to 7 days’ battery life, works with iOS & Android
  • Google Fitbit Air is the unbelievably comfortable, exceptionally smart way to transform your health[1]; and Google Health brings together effortless tracking and adaptive coaching to help make the most of your everyday[2]
  • Unlock more with Google Health Premium: With a premium membership, get personalized coaching that’s built with Gemini and adapts to your life[2]; get a 3-month trial at no cost to you[5] (Google Health Premium subscription sold separately)
  • Comfortable fit - One Size Tracker (130-210 mm): The lightweight, micro-adjustable fit sits comfortably and quietly, so you can wear Google Fitbit Air through work, play, and sleep; advanced sensors and new algorithms power more accurate, precise health tracking, 24/7[1]
  • Designed for every occasion: With no screen to distract you or disrupt your style, your tracker moves seamlessly from bracelet to workout band to sleep band, and you can change looks in seconds – just press the pebble in, click, and go
  • Long battery life: Google Fitbit Air’s battery lasts up to a week, and fast charging gets you one day of battery life in just five minutes[6,7]

These are optional ways to access data, not prerequisites for a personal fitness warehouse. External files can simplify access to a growing collection, while hosted access can suit a workflow that needs it; both add configuration and a different trust boundary from a database file on your computer.

Keep the results portable

You can retain the DuckDB database file as your working analytical store, or export derived data when you want to use it elsewhere. DuckDB documents exporting a database to CSV or Parquet and importing that export into a fresh database. Its export/import documentation notes that the exported schema uses plain CREATE statements, so import into a fresh database rather than one that already contains the exported schema.

The dbt-duckdb documentation also describes external materialization for file outputs. Choose CSV when broad compatibility matters or Parquet when you want a columnar file format; use the format supported by the destination workflow you have in mind. Check the export syntax against the DuckDB version you are running.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sources and version notes

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Apple HealthData WarehouseDBTDuckDBfitness dataGarmin

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.