tcgoetz / GarminDB

Download and parse data from Garmin Connect or a Garmin watch, FitBit CSV, and MS Health CSV files into and analyze data in Sqlite serverless databases with Jupyter notebooks.
GNU General Public License v2.0
1.18k stars 142 forks source link

Duckdb instead of sqlite? #238

Open baslat opened 3 months ago

baslat commented 3 months ago

Is your feature request related to a problem? Please describe. Very useful tool! I'm wondering about forking it to create duckdb instead of sqlite as duckdb has some analytical advantages over sqlite.

Describe the solution you'd like I'm interested in knowing your thoughts on how much work this would be, where to start, whether it would be something "official" you would consider, etc? I'm not specifically asking you to do it (although if you want to that would be cool), more to point me in the right direction so that I might have a tinker.

Describe alternatives you've considered I tried converting the output sqlite db files to duckdb using sqlite2duckdb but get invalid time errors (I think it's due to some durations being stored as all 0s in sqllite and that trying to be converted to a timestamp by sqlite2duckdb, but haven't confirmed).

tcgoetz commented 2 months ago

I don't think you need to fork. Feel free to offer a pull request with the needed functionality. GarminDb releis heavily on SqlAlchemy. If SqlAchemy support DuckDB, then adding support for DuckDB to GarminDb should be relatively easy.