Skip to content

Commit

Permalink
fix(sqllab): slow pop datasource query (apache#25741)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed Oct 26, 2023
1 parent c7f8d11 commit 2a2bc82
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion superset-frontend/src/SqlLab/actions/sqlLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2a2bc82

Please sign in to comment.