GitHub user manimovassagh added a comment to the discussion: Feat : add export 
to "Explore by" table

This would be a really useful addition. Right now if you need to export the 
drillthrough data, there are a couple of workarounds:

1. **Copy-paste** -- Select the table contents in the modal, copy, and paste 
into a spreadsheet. Clunky but works in a pinch.

2. **Use the Chart Data API** -- Hit the REST API directly with the same 
filters applied. For example:
   ```bash
   curl -X POST "https://your-superset/api/v1/chart/data"; \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d 
'{"datasource":{"id":1,"type":"table"},"queries":[{"filters":[{"col":"your_column","op":"==","val":"filtered_value"}]}]}'
   ```
   Then save the JSON response or pipe it through `jq` into CSV.

3. **Build a dedicated drillthrough dashboard** -- Create a separate Table 
chart with the same dataset, add the relevant filters as dashboard-level 
filters, and use that for exports (Table charts support CSV/Excel download 
natively).

For the feature request itself, if anyone wants to contribute this, the modal 
lives in `superset-frontend/src/components/Chart/DrillDetail/` -- the 
`DrillDetailPane` component renders the table. Adding an export button there 
that calls the existing `exportChart` utility would be the cleanest path. The 
filename convention you suggested (`<graph_name>-<date>-filteredBy-<filters>`) 
makes a lot of sense.

Worth filing a proper feature request issue if one does not exist already so it 
gets tracked on the roadmap.

GitHub link: 
https://github.com/apache/superset/discussions/38760#discussioncomment-16233471

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to