feat(streaming): Streaming CSV uploads for over 100k records for constant memory usage (#35478)

This commit is contained in:
amaannawab923
2025-11-20 22:46:59 +05:30
committed by GitHub
parent 6d359161bb
commit 35f156a1e1
27 changed files with 3096 additions and 71 deletions

View File

@@ -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) => {