Export chart to .CSV\.ODS #35846
Replies: 1 comment
-
|
To export a table/chart in Superset and ensure the exported data matches what you see in the UI, your form_data (or query_context) must include these required fields: datasource (formatted as To match the exported data to your table, make sure form_data includes the same filters, columns, metrics, and especially the row_limit as used in the UI. If you want to export only the visible rows (e.g., 25), set row_limit to 25; if you want all data, set it to a high value. Any mismatch here will cause the exported file to have more or fewer rows than expected (source). Fields in form_data that directly affect the export include: datasource, viz_type, columns, metrics, filters, orderby, row_limit, and query_mode. These are extracted and normalized by Superset's query logic (source). If you pass form_data directly to the export endpoint, ensure it is not empty and contains all the above fields. Also, include datasource_id and datasource_type as top-level fields in your API request (source). In summary: always use the exact form_data that was used to build the table, with the correct datasource, viz_type, filters, and row_limit, to avoid empty queries and row count mismatches. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I receive a response from the backend, and a table is built based on this response:



In the future, I want to export this table in different formats:
How can I export a graph in the required format based on the answer that was used to build the table?
I tried to pass form_data, but I got an error:

There was also a problem that irrelevant data in the table was exported, for example: the table had 25 rows, but the Excel table exported had 16,596 rows.
Beta Was this translation helpful? Give feedback.
All reactions