eschutho opened a new pull request, #36772:
URL: https://github.com/apache/superset/pull/36772
### SUMMARY
This PR introduces interactive table capabilities inspired by Omni's data
curation approach, where the table becomes a query-building interface rather
than just output.
#### Key Features:
Query Tab in Explore (76c49efb)
Adds a new "Query" tab in the Data panel (alongside Results and Samples)
Displays the generated SQL with syntax highlighting
Auto-updates when form data changes, providing real-time SQL visibility
Column Header Context Menu for Standard Table (a1ea1af1)
Right-click context menu on column headers in the standard Table chart
Options: "Group by this column", "Add as metric" (SUM/AVG/COUNT/etc.), "Hide
column"
Uses setControlValue hook to update Explore controls
Column Header Interactions for AG Grid Table (4b2e6d12)
Extends AG Grid's existing kebab menu with the same interactive options
Group by, Add as metric (with submenu for aggregates), Hide column
Only appears in Explore context (when setControlValue is available)
How It Works:
Users can click on column headers to add Group By dimensions or create
aggregate metrics
The Query tab shows the SQL updating in real-time as users interact with the
table
This creates a bidirectional workflow: see data → click to refine → see SQL
change → repeat
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: Tables are output-only; users must manually configure controls to
change the query
After:
Column headers have context menus for quick query modification
New Query tab shows the generated SQL that updates as you interact with the
table
#### TESTING INSTRUCTIONS
Navigate to Explore with any dataset
Select either "Table" or "AG Grid Table" visualization
Run a query with some columns
Test Query Tab:
4. Click on the "Query" tab in the data panel (next to Results/Samples)
5. Verify SQL is displayed with syntax highlighting
6. Change a control (e.g., add a metric) and verify SQL updates
Test Column Interactions (Standard Table):
7. Right-click on a dimension column header
8. Click "Group by this column" - verify column is added to Group By control
9. Right-click on a numeric column, hover "Add as metric", select "SUM"
10. Verify a new SUM metric appears in the Metrics control
11. Click "Hide column" and verify the column is hidden
Test Column Interactions (AG Grid Table):
12. Switch to AG Grid Table visualization
13. Click the kebab menu (⋮) on a column header
14. Verify "Group by this column", "Add as metric", and "Hide column"
options appear
15. Test each option and verify controls update correctly
#### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration
- [x] Introduces new feature or API
- [ ] Removes existing feature or API
Technical Notes:
Uses setControlValue from chart hooks to update Explore controls from within
chart plugins
Uses getChartDataRequest with resultType: 'query' to fetch generated SQL
Column interactions are only visible in Explore context (not on dashboards)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]