mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
[sql lab - explore flow] make sure groupby is empty (#5596)
This commit is contained in:
parent
21bf8d9f8f
commit
682ca3874e
@ -111,18 +111,15 @@ class ExploreResultsButton extends React.PureComponent {
|
|||||||
.done((resp) => {
|
.done((resp) => {
|
||||||
const columns = this.getColumns();
|
const columns = this.getColumns();
|
||||||
const data = JSON.parse(resp);
|
const data = JSON.parse(resp);
|
||||||
const mainGroupBy = columns.filter(d => d.is_dim)[0];
|
|
||||||
const formData = {
|
const formData = {
|
||||||
datasource: `${data.table_id}__table`,
|
datasource: `${data.table_id}__table`,
|
||||||
metrics: [],
|
metrics: [],
|
||||||
|
groupby: [],
|
||||||
viz_type: 'table',
|
viz_type: 'table',
|
||||||
since: '100 years ago',
|
since: '100 years ago',
|
||||||
all_columns: columns.map(c => c.name),
|
all_columns: columns.map(c => c.name),
|
||||||
row_limit: 1000,
|
row_limit: 1000,
|
||||||
};
|
};
|
||||||
if (mainGroupBy) {
|
|
||||||
formData.groupby = [mainGroupBy.name];
|
|
||||||
}
|
|
||||||
this.props.actions.addInfoToast(t('Creating a data source and creating a new tab'));
|
this.props.actions.addInfoToast(t('Creating a data source and creating a new tab'));
|
||||||
|
|
||||||
// open new window for data visualization
|
// open new window for data visualization
|
||||||
|
Loading…
Reference in New Issue
Block a user