{"html_url": "https://github.com/simonw/datasette/issues/657#issuecomment-761179229", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/657", "id": 761179229, "node_id": "MDEyOklzc3VlQ29tbWVudDc2MTE3OTIyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-15T20:24:35Z", "updated_at": "2021-01-15T20:24:35Z", "author_association": "OWNER", "body": "I'm not sure how I missed this issue but it's almost a year later and I'm finally taking a look at your Parquet work.\r\n\r\nThis is yet more evidence that allowing plugins to provide their own custom `Database` objects would be a good idea.\r\n\r\nI started exploring what Datasette would like on PostgreSQL in #670 - my concern was that I would need to add a large amount of database abstraction code which would dramatically increase the complexity of the core project, but my thinking now is that it might be tractable - Datasette doesn't actually construct SQL in complex ways anywhere outside of the `TableView` class so abstracting away just that bit should be feasible.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 548591089, "label": "Allow creation of virtual tables at startup"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/657#issuecomment-761101878", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/657", "id": 761101878, "node_id": "MDEyOklzc3VlQ29tbWVudDc2MTEwMTg3OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-01-15T18:16:01Z", "updated_at": "2021-01-15T18:16:01Z", "author_association": "OWNER", "body": "I think the `startup()` plugin hook at https://docs.datasette.io/en/stable/plugin_hooks.html#startup-datasette should be able to fit this. You can write a plugin which uses that hook to execute `CREATE VIRTUAL TABLE` against one or more databases when Datasette first starts running.\r\n\r\nWould that work here?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 548591089, "label": "Allow creation of virtual tables at startup"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/657#issuecomment-576759416", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/657", "id": 576759416, "node_id": "MDEyOklzc3VlQ29tbWVudDU3Njc1OTQxNg==", "user": {"value": 1055831, "label": "dazzag24"}, "created_at": "2020-01-21T16:20:19Z", "updated_at": "2020-01-21T16:20:19Z", "author_association": "NONE", "body": "Hi,\r\n\r\nI've completed some changes to my fork of datasette that allows it to automatically create the parquet virtual table when you supply it with a filename that has the \".parquet\" extension.\r\n\r\nI had to figure out how to make the \"CREATE VIRTUAL TABLE\" statement only be applied to the fake in memory parquet database and not to any others that were also being loaded. Thus it supports mixed mode databases e.g\r\n\r\n```\r\ndatasette my_test.parquet normal_sqlite_file.db --load-extension=libparquet.so --load-extensio\r\nn=mod_spatialite.so\r\n```\r\n\r\nPlease see my changes here: \r\nhttps://github.com/dazzag24/datasette/commit/8e18394353114f17291fd1857073b1e0485a1faf\r\n\r\nThanks\r\n\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 548591089, "label": "Allow creation of virtual tables at startup"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/657#issuecomment-575321322", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/657", "id": 575321322, "node_id": "MDEyOklzc3VlQ29tbWVudDU3NTMyMTMyMg==", "user": {"value": 1055831, "label": "dazzag24"}, "created_at": "2020-01-16T20:01:43Z", "updated_at": "2020-01-16T20:01:43Z", "author_association": "NONE", "body": "I have successfully tested datasette using a parquet VIRTUAL TABLE. In the first terminal:\r\n\r\n```datasette airports.db --load-extension=libparquet```\r\n\r\nIn another terminal I load the same sqlite db file using the sqlite3 cli client.\r\n\r\n```$ sqlite3 airports.db```\r\n\r\nand then load the parquet extension and create the virtual table.\r\n\r\n```\r\nsqlite> .load /home/darreng/metars/libparquet\r\nsqlite> CREATE VIRTUAL TABLE mytable USING parquet('/home/xx/data.parquet');\r\n```\r\n\r\nNow the parquet virtual table is usable by the datasette web UI.\r\n\r\nIts not an ideal solution but is a proof that datasette works the parquet extension.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 548591089, "label": "Allow creation of virtual tables at startup"}, "performed_via_github_app": null}