{"html_url": "https://github.com/simonw/sqlite-utils/issues/328#issuecomment-925292384", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/328", "id": 925292384, "node_id": "IC_kwDOCGYnMM43Jtdg", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-22T20:09:53Z", "updated_at": "2021-09-22T20:09:53Z", "author_association": "OWNER", "body": "Good catch, thanks.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1004613267, "label": "Invalid JSON output when no rows"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/328#issuecomment-925296085", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/328", "id": 925296085, "node_id": "IC_kwDOCGYnMM43JuXV", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-22T20:14:53Z", "updated_at": "2021-09-22T20:14:53Z", "author_association": "OWNER", "body": "The bug is in this code: https://github.com/simonw/sqlite-utils/blob/77c240df56068341561e95e4a412cbfa24dc5bc7/sqlite_utils/cli.py#L2205-L2227", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1004613267, "label": "Invalid JSON output when no rows"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/325#issuecomment-925300637", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/325", "id": 925300637, "node_id": "IC_kwDOCGYnMM43Jved", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-22T20:21:26Z", "updated_at": "2021-09-22T20:21:26Z", "author_association": "OWNER", "body": "The `t1` and `t2` aliases were meant to handle this case, but the are no good if the tool throws an error.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 990844088, "label": "sqlite-utils memory can't deal with multiple files with the same name"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/328#issuecomment-925300720", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/328", "id": 925300720, "node_id": "IC_kwDOCGYnMM43Jvfw", "user": {"value": 12752, "label": "gravis"}, "created_at": "2021-09-22T20:21:33Z", "updated_at": "2021-09-22T20:21:33Z", "author_association": "NONE", "body": "Wow, that was fast! Thank you!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1004613267, "label": "Invalid JSON output when no rows"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/325#issuecomment-925301981", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/325", "id": 925301981, "node_id": "IC_kwDOCGYnMM43Jvzd", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-22T20:23:25Z", "updated_at": "2021-09-22T20:23:25Z", "author_association": "OWNER", "body": "Oddly I can't replicate this on macOS:\r\n\r\n```\r\n(sqlite-utils) sqlite-utils % ls foo/*.csv\r\nfoo/bug.csv\r\n(sqlite-utils) sqlite-utils % ls bar/*.csv\r\nbar/bug.csv\r\n(sqlite-utils) sqlite-utils % sqlite-utils memory foo/bug.csv bar/bug.csv --schema\r\nCREATE TABLE \"bug\" (\r\n [col1] TEXT,\r\n [col2] TEXT\r\n);\r\nCREATE VIEW t1 AS select * from [bug];\r\nCREATE VIEW t AS select * from [bug];\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 990844088, "label": "sqlite-utils memory can't deal with multiple files with the same name"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/325#issuecomment-925303497", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/325", "id": 925303497, "node_id": "IC_kwDOCGYnMM43JwLJ", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-22T20:25:44Z", "updated_at": "2021-09-22T20:25:44Z", "author_association": "OWNER", "body": "Here's the relevant code: https://github.com/simonw/sqlite-utils/blob/7427a9137f60de961b6331d0922a3f03da0d1890/sqlite_utils/cli.py#L1289-L1292\r\n\r\nI can fix this by checking to see if `csv_table` is already in use and adding a suffix.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 990844088, "label": "sqlite-utils memory can't deal with multiple files with the same name"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/325#issuecomment-925321439", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/325", "id": 925321439, "node_id": "IC_kwDOCGYnMM43J0jf", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-09-22T20:52:56Z", "updated_at": "2021-09-22T20:52:56Z", "author_association": "OWNER", "body": "Updated documentation: https://sqlite-utils.datasette.io/en/latest/cli.html#running-queries-directly-against-csv-or-json\r\n\r\n> If two files have the same name they will be assigned a numeric suffix:\r\n> \r\n> $ sqlite-utils memory foo/data.csv bar/data.csv \"select * from data_2\"", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 990844088, "label": "sqlite-utils memory can't deal with multiple files with the same name"}, "performed_via_github_app": null}