{"html_url": "https://github.com/simonw/datasette/issues/1259#issuecomment-797827038", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1259", "id": 797827038, "node_id": "MDEyOklzc3VlQ29tbWVudDc5NzgyNzAzOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-03-13T00:15:40Z", "updated_at": "2021-03-13T00:15:40Z", "author_association": "OWNER", "body": "If all of the facets were being calculated in a single query, I'd be willing to bump the facet time limit up to something a lot higher, maybe even a full second. There's a chance that could work amazingly well with a materialized CTE.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 830567275, "label": "Research using CTEs for faster facet counts"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/healthkit-to-sqlite/issues/14#issuecomment-798436026", "issue_url": "https://api.github.com/repos/dogsheep/healthkit-to-sqlite/issues/14", "id": 798436026, "node_id": "MDEyOklzc3VlQ29tbWVudDc5ODQzNjAyNg==", "user": {"value": 1234956, "label": "n8henrie"}, "created_at": "2021-03-13T14:23:16Z", "updated_at": "2021-03-13T14:23:16Z", "author_association": "NONE", "body": "This PR allows my import to succeed.\r\n\r\nIt looks like some events don't have an `id`, but do have `HKExternalUUID` (which gets turned into `metadata_HKExternalUUID`), so I use this as a fallback.\r\n\r\nIf a record has neither of these, I changed it to just print the record (for debugging) and `return`.\r\n\r\nFor some odd reason this ran fine at first, and now (after removing the generated db and trying again) I'm getting a different error (duplicate column name).\r\n\r\nLooks like it may have run when I had two successive runs without remembering to delete the db in between. Will try to refactor.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771608692, "label": "UNIQUE constraint failed: workouts.id"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/healthkit-to-sqlite/issues/14#issuecomment-798468572", "issue_url": "https://api.github.com/repos/dogsheep/healthkit-to-sqlite/issues/14", "id": 798468572, "node_id": "MDEyOklzc3VlQ29tbWVudDc5ODQ2ODU3Mg==", "user": {"value": 1234956, "label": "n8henrie"}, "created_at": "2021-03-13T14:47:31Z", "updated_at": "2021-03-13T14:47:31Z", "author_association": "NONE", "body": "Ok, new PR works. I'm not `git` enough so I just force-pushed over the old one.\r\n\r\nI still end up with a lot of activities that are missing an `id` and therefore skipped (since this is used as the primary key). For example:\r\n\r\n```\r\n{'workoutActivityType': 'HKWorkoutActivityTypeRunning', 'duration': '35.31666666666667', 'durationUnit': 'min', 'totalDistance': '4.010870267636999', 'totalDistanceUnit': 'mi', 'totalEnergyBurned': '660.3516235351562', 'totalEnergyBurnedUnit': 'Cal', 'sourceName': 'Strava', 'sourceVersion': '22810', 'creationDate': '2020-07-16 13:38:26 -0700', 'startDate': '2020-07-16 06:38:26 -0700', 'endDate': '2020-07-16 07:13:45 -0700'}\r\n```\r\n\r\nI also end up with some unhappy characters (in the skipped events), such as: `'sourceName': 'Nathan\u2019s Apple\\xa0Watch',`.\r\n\r\nBut it's successfully making it through the file, and the resulting db opens in datasette, so I'd call that progress.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 771608692, "label": "UNIQUE constraint failed: workouts.id"}, "performed_via_github_app": null}