mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
feat(streaming): Streaming CSV uploads for over 100k records for constant memory usage (#35478)
This commit is contained in:
@@ -248,6 +248,7 @@ export const exportChart = async ({
|
||||
resultType = 'full',
|
||||
force = false,
|
||||
ownState = {},
|
||||
onStartStreamingExport = null,
|
||||
}) => {
|
||||
let url;
|
||||
let payload;
|
||||
@@ -272,7 +273,18 @@ export const exportChart = async ({
|
||||
});
|
||||
}
|
||||
|
||||
SupersetClient.postForm(url, { form_data: safeStringify(payload) });
|
||||
// Check if streaming export handler is provided (from dashboard Chart.jsx)
|
||||
if (onStartStreamingExport) {
|
||||
// Streaming is handled by the caller - pass URL, payload, and export type
|
||||
onStartStreamingExport({
|
||||
url,
|
||||
payload,
|
||||
exportType: resultFormat,
|
||||
});
|
||||
} else {
|
||||
// Fallback to original behavior for non-streaming exports
|
||||
SupersetClient.postForm(url, { form_data: safeStringify(payload) });
|
||||
}
|
||||
};
|
||||
|
||||
export const exploreChart = (formData, requestParams) => {
|
||||
|
||||
Reference in New Issue
Block a user