Hi all, Superset can't show hierarchical rows (say sessions, steps and events) as one expandable table. AG Grid's tree data is an Enterprise feature, so Table V2 can't simply turn it on.
#46490 <https://github.com/apache/superset/pull/46490> adds Tree, a third query mode of the AG Grid table chart next to Aggregate and Raw records. A page of parent rows expands into each level's child rows, and CSV and Excel exports include the children. https://github.com/apache/superset/pull/46490 It is behind a new flag, TABLE_V2_TREE_MODE_ENABLED, off by default, and also needs AG_GRID_TABLE_ENABLED. The flag gates the UI only. No migration, no new dependency, AG Grid Community only. Charts that don't use Tree run as today. One change applies regardless of the flag: the chart data API accepts two new post-processing operations. Design choices: - A query mode of Table V2, not a new chart type. - In core, because extensions can't add a query mode to a built-in chart or hook its CSV/Excel export. - Children load in batched queries per level, using a new first_n_per_group operation. - For CSV/XLSX on a Tree chart, the chart data API swaps in a flat export query saved in form_data.tree_export. - Tree settings use their own saved keys and never change Table V2's. - An older build runs a saved Tree chart as a plain Table V2 chart. If there are no objections by Monday, December 1, I'll consider this approved by lazy consensus and continue with the review on the PR. Happy to answer questions here or on the PR. Thanks, Damian Pendrak
