{"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-803631102", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 803631102, "node_id": "MDEyOklzc3VlQ29tbWVudDgwMzYzMTEwMg==", "user": {"value": 192568, "label": "mroswell"}, "created_at": "2021-03-21T17:48:42Z", "updated_at": "2021-03-21T17:48:42Z", "author_association": "CONTRIBUTOR", "body": "I like this idea. Though it might be nice to have some kind of automated system from database to file, so that developers could easily track diffs.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-737463116", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 737463116, "node_id": "MDEyOklzc3VlQ29tbWVudDczNzQ2MzExNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-02T20:02:10Z", "updated_at": "2020-12-02T20:03:01Z", "author_association": "OWNER", "body": "My idea is that if you installed my proposed plugin you wouldn't need `metadata.json` at all - your metadata would instead live in a table in the connected SQLite database files - either one table per database (so the metadata can live in the same place as the data) or maybe also in a dedicated separate database file, for if you want to add metadata to an otherwise read-only database.\r\n\r\nThe plugin would then provide a UI for editing that metadata - maybe by configuring some writable canned queries or maybe something more custom than that. Or you could edit the metadata by manually editing the SQLite database file (or loading data into it using a tool like [yaml-to-sqlite](https://github.com/simonw/yaml-to-sqlite)).", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-737428262", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 737428262, "node_id": "MDEyOklzc3VlQ29tbWVudDczNzQyODI2Mg==", "user": {"value": 596279, "label": "zaneselvans"}, "created_at": "2020-12-02T18:55:21Z", "updated_at": "2020-12-02T18:55:21Z", "author_association": "NONE", "body": "Are you thinking that those metadata tables would be added to the SQLite DB by Datasette, when you tell it to wrap up the database, with the metadata coming from the `metadata.json`? Would it be easy to allow the prepopulation of those tables in the database itself? We've been struggling with the best way to make sure that the data is always accompanied by metadata, and baking it all into the database itself would be nice, since then we wouldn't need to worry about separately distributing different files in different contexts.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-737402392", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 737402392, "node_id": "MDEyOklzc3VlQ29tbWVudDczNzQwMjM5Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-12-02T18:08:55Z", "updated_at": "2020-12-02T18:08:55Z", "author_association": "OWNER", "body": "SQLite does let you add comments in your CREATE TABLE statements:\r\n```sql\r\nCREATE TABLE something (\r\n id integer primary key, -- integer primary key\r\n created text -- created date as ISO datetime\r\n);\r\n```\r\nBut the only mechanism for reading those back is to retrieve that `CREATE TABLE` block of SQL from the `sqlite_master` table and run a parser against it.\r\n\r\nI've so far resisted adding a SQL syntax parser to Datasette for complexity reasons - though I'm increasingly thinking I'll need to do it at some point.\r\n\r\nI think I'll leave this to plugins. I'm definitely going to build a plugin that lets you store metadata for tables and columns in a SQLite database table, which will then support interactively editing metadata through a UI.\r\n\r\nA plugin which extracts column comments from the SQLite CREATE TABLE comments would be feasible too, if I design the plugin hooks well.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-736173084", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 736173084, "node_id": "MDEyOklzc3VlQ29tbWVudDczNjE3MzA4NA==", "user": {"value": 596279, "label": "zaneselvans"}, "created_at": "2020-12-01T02:20:58Z", "updated_at": "2020-12-01T02:20:58Z", "author_association": "NONE", "body": "Are there common patterns for storing column-based metadata inside SQLite itself? I know Postgres allows \"comment\" fields, which this is kind of trying to replicate. Should the `units` and `description` and possibly other per-column metadata fields be combined into a single (tabular?) structure, that would be displayed above the data on the table / query results page?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-727626657", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 727626657, "node_id": "MDEyOklzc3VlQ29tbWVudDcyNzYyNjY1Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-11-15T19:54:44Z", "updated_at": "2020-11-15T19:54:44Z", "author_association": "OWNER", "body": "This will also benefit from the metadata plugin hook: #860 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-675720040", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 675720040, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTcyMDA0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T21:05:24Z", "updated_at": "2020-08-18T21:05:24Z", "author_association": "OWNER", "body": "Is `columns` the right key for this in the table metadata block? I might want to use that for initial values for `?_col=` in #615.\r\n\r\nAlternative names:\r\n\r\n- `column_descriptions`\r\n- `column_info`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-675718593", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 675718593, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTcxODU5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T21:02:11Z", "updated_at": "2020-08-18T21:02:24Z", "author_association": "OWNER", "body": "Easiest solution: if you provide column metadata it gets displayed above the table, something like on https://fivethirtyeight.datasettes.com/fivethirtyeight/antiquities-act%2Factions_under_antiquities_act\r\n\r\n\"fivethirtyeight__antiquities-act_actions_under_antiquities_act__344_rows\"\r\n\r\nHTML `title=` tooltips are also added to the table headers, which won't be visible on touch devices but that's OK because the information is visible on the page already.", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/942#issuecomment-675715472", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/942", "id": 675715472, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTcxNTQ3Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T20:55:02Z", "updated_at": "2020-08-18T20:55:02Z", "author_association": "OWNER", "body": "Could display these as tooltips on icons something like this (from the experimental `datasette-inspect-columns` plugin):\r\n\r\n\"fixtures__facetable__15_rows_and_NOAA_tides_second_attempt_-_Jupyter_Notebook\"\r\n\r\nThis would need to take accessibility into account, and would need a different display for the mobile web layout. Need to consider how it will interact with the column menu suggested in #690.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 681334912, "label": "Support column descriptions in metadata.json"}, "performed_via_github_app": null}