mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
fix(sqllab): slow pop datasource query (#25741)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user