Skip to content

Commit

Permalink
fix(sqllab): slow pop datasource query (#25741)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2a2bc82)
  • Loading branch information
justinpark authored and michael-s-molina committed Oct 31, 2023
1 parent 01d3ac2 commit fbe7e62
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 @@ -1384,8 +1384,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 fbe7e62

Please sign in to comment.