From 2a2bc82a8bbf900c825ba44e8b0f3f320b5962e0 Mon Sep 17 00:00:00 2001 From: "JUST.in DO IT" Date: Thu, 26 Oct 2023 12:44:41 -0700 Subject: [PATCH] fix(sqllab): slow pop datasource query (#25741) --- superset-frontend/src/SqlLab/actions/sqlLab.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js b/superset-frontend/src/SqlLab/actions/sqlLab.js index ac26f1fc6ca38..57e01088a831d 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.js +++ b/superset-frontend/src/SqlLab/actions/sqlLab.js @@ -1395,8 +1395,14 @@ export function popDatasourceQuery(datasourceKey, sql) { return function (dispatch) { const QUERY_TEXT = t('Query'); const datasetId = datasourceKey.split('__')[0]; + + const queryParams = rison.encode({ + keys: ['none'], + columns: ['name', 'schema', 'database.id', 'select_star'], + }); + return SupersetClient.get({ - endpoint: `/api/v1/dataset/${datasetId}?q=(keys:!(none))`, + endpoint: `/api/v1/dataset/${datasetId}?q=${queryParams}`, }) .then(({ json }) => dispatch(