-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
A place to hold the to-do list for adding queries to dashboards
Describe the solution you'd like
In order to make migration for Filter to Query easier we want to add a JSON column to the Insight Model that can hold a query
Insight stops meaning "something with filters that draws a graph or table" and starts meaning "something saved that queries your data"
consequences:
- migration from filter to query is straight-forward to roll backwards and forwards
- a bunch of behaviour remains in place for free
- e.g. layout, moving between dashboards, naming, renaming, descriptions, tags, and more
- anything that wants to be both a query and be on a dashboard (without extra code) needs to be a query saved to an insight model
- ???
Can be done without backend querying:
- if we're writing JSON to the DB can we avoid writing messy JSON (e.g. https://github.com/supabase/pg_jsonschema#try-it-out)
- is it better to validate the schema at the API layer than in the DB (or do we do both?)
- if we have JSON schema for a query can we generate the TS types from that
- or since we have TS types can we generate the JSON schema from that
- how can we keep TS code that converts filter <-> query in sync with python code that does the same
- UI to save and name a query (partly feat: queries in insights view #14027 )
- AddToDashboardModal needs to handle insights and queries
- saved insights page should (initially) not show insights that have no filter
- DashboardTiles need to know how to draw DataTable query / Insight from Query not filter (feat: allow query on tiles #13980)
- export to CSV works for datatable query? (feat: export query tiles as CSV #13997)
- dashboard templates needs to be able to handle query tiles
- don't show edit chrome if no edit permissions
- don't show edit chrome in insight view mode
- don't show edit chrome in dashboard view mode
- replace inline editor button with an "open in insight editor button" see feat: replace open in query builder with new insight page #14709
- add data table tab? is that different to sql tab?
Not strictly to do with dashboards
- allow text based editing of insight tabs see feat: replace open in query builder with new insight page #14709 (comment)
Needs backend querying:
- sharing dashboards with queries on them
- export to image works for query tiles?
- merging dashboard filters and tile queries
- convert dashboard filters to dashboard queries
- generate cache key for query based insights
- merge dashboard filters onto tiles
- query on the backend so insight caching can work with them