{"html_url": "https://github.com/dogsheep/google-takeout-to-sqlite/pull/5#issuecomment-888075098", "issue_url": "https://api.github.com/repos/dogsheep/google-takeout-to-sqlite/issues/5", "id": 888075098, "node_id": "IC_kwDODFE5qs407vNa", "user": {"value": 28565, "label": "maxhawkins"}, "created_at": "2021-07-28T07:18:56Z", "updated_at": "2021-07-28T07:18:56Z", "author_association": "NONE", "body": "> I'm not sure why but my most recent import, when displayed in Datasette, looks like this:\r\n> \r\n> \"mbox__mbox_emails__753_446_rows\"\r\n\r\nI did some investigation into this issue and made a fix [here](https://github.com/dogsheep/google-takeout-to-sqlite/pull/8/commits/8ee555c2889a38ff42b95664ee074b4a01a82f06). The problem was that some messages (like gchat logs) don't have a `Message-Id` and we need to use `X-GM-THRID` as the pkey instead.\r\n\r\n@simonw While looking into this I found something unexpected about how sqlite_utils handles upserts if the pkey column is `None`. When the pkey is NULL I'd expect the function to either use rowid or throw an exception. Instead, it seems upsert_all creates a row where all columns are NULL instead of using the values provided as parameters.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 813880401, "label": "WIP: Add Gmail takeout mbox import"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1405#issuecomment-888694144", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1405", "id": 888694144, "node_id": "IC_kwDOBm6k_c40-GWA", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-07-28T23:51:59Z", "updated_at": "2021-07-28T23:51:59Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/blob/eccfeb0871dd4bc27870faf64f80ac68e5b6bc0d/datasette/utils/__init__.py#L918-L926", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 955316250, "label": "utils.parse_metadata() should be a documented internal function"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1405#issuecomment-888694261", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1405", "id": 888694261, "node_id": "IC_kwDOBm6k_c40-GX1", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-07-28T23:52:21Z", "updated_at": "2021-07-28T23:52:21Z", "author_association": "OWNER", "body": "Document that it can raise a `BadMetadataError` exception.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 955316250, "label": "utils.parse_metadata() should be a documented internal function"}, "performed_via_github_app": null}