View source query SQL on the page
Feature Description
With the addition of USQL, I can no longer see the query that was used to hit my source db, but instead am seeing the query to hit the local duckdb. I would like to see that original query.
Goal of Feature
Displaying source queries is one of the big feature draws for using evidence in a technical context. To be honest, this feature request feels like it could be a bug fix request, since the loss of previously displayable queries feels like a functional regression.
Current Solution / Workarounds
Have people look at github source, which is not great, especially since it requires that everyone have github access and that we display the source side-by-side with the report.
Alternatives
Staying on evidence pre-USQL rollout, perhaps v21.
This is a good idea. @ItsMeBrianD maybe we should add it to the schema explorer?
Looks like we can enable this if the JSON extension works in WASM correctly: https://duckdb.org/docs/archive/0.9.2/extensions/json#deserializing-sql-to-json-and-vice-versa
Okay so some ideas here:
Challenges
- There are potentially multiple source queries per page query, could look messy
- Not all sources have source queries. Eg csv connector . What do we do in this case?
Ideas
Some way to see source queries in the query viewer pane.
- Perhaps there is a third button in the query viewer, which shows all the source queries
- perhaps on hover over the table name with the cursor, it flashes up the source query
Advantages
- Immediately in the context of the query
Disadvantages
- Requires us to parse the SQL and detect what source tables are being used
- UX could be hard to read
More information about the queries in the schema explorer
Advantages
- Logical place to put source information
- One source query per display area
Disadvantages
- Schema explorer not currently available in prod (easy to change), just add a link
- The source query is not "directly on the page"
@ItsMeBrianD why does the JSON extension matter here?