{"html_url": "https://github.com/simonw/datasette/issues/588#issuecomment-544318553", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/588", "id": 544318553, "node_id": "MDEyOklzc3VlQ29tbWVudDU0NDMxODU1Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-10-21T01:48:41Z", "updated_at": "2019-10-21T01:48:41Z", "author_association": "OWNER", "body": "Closing this, but #260 would definitely help here.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 505512251, "label": "Queries per DB table in metadata.json"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/588#issuecomment-544318343", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/588", "id": 544318343, "node_id": "MDEyOklzc3VlQ29tbWVudDU0NDMxODM0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-10-21T01:47:11Z", "updated_at": "2019-10-21T01:47:11Z", "author_association": "OWNER", "body": "I think I see what's gone wrong here. Here's your example re-indented:\r\n```json\r\n{\r\n \"databases\": {\r\n \"MYDB\": {\r\n \"tables\": {\r\n \"MYFIRSTTABLE\": {\r\n \"source\": \"Test\",\r\n \"source_url\": \"https://www.google.com\",\r\n \"queries\": {\r\n \"Query 1\": {\r\n \"sql\": \"select * from MYFIRSTTABLE\",\r\n \"title\": \"Query 1\",\r\n \"description\": \"This is the first query\"\r\n }\r\n }\r\n },\r\n \"MYSECONDTABLE\": {\r\n \"source\": \"Test2\",\r\n \"source_url\": \"https://www.google.com\",\r\n \"queries\": {\r\n \"Query 2\": {\r\n \"sql\": \"select * from MYSECONDTABLE;\",\r\n \"title\": \"Query 2\",\r\n \"description\": \"This is the second query\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n```\r\n\r\nThe `\"queries\" section isn't supported at the table level - it only works at the database level. So that example should look like this:\r\n\r\n```json\r\n{\r\n \"databases\": {\r\n \"MYDB\": {\r\n \"tables\": {\r\n \"MYFIRSTTABLE\": {\r\n \"source\": \"Test\",\r\n \"source_url\": \"https://www.google.com\"\r\n },\r\n \"MYSECONDTABLE\": {\r\n \"source\": \"Test2\",\r\n \"source_url\": \"https://www.google.com\"\r\n }\r\n },\r\n \"queries\": {\r\n \"Query 1\": {\r\n \"sql\": \"select * from MYFIRSTTABLE\",\r\n \"title\": \"Query 1\",\r\n \"description\": \"This is the first query\"\r\n },\r\n \"Query 2\": {\r\n \"sql\": \"select * from MYSECONDTABLE;\",\r\n \"title\": \"Query 2\",\r\n \"description\": \"This is the second query\"\r\n }\r\n }\r\n }\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": 505512251, "label": "Queries per DB table in metadata.json"}, "performed_via_github_app": null}