mirror of https://github.com/apache/superset.git
[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) => {
|
||||
const columns = this.getColumns();
|
||||
const data = JSON.parse(resp);
|
||||
const mainGroupBy = columns.filter(d => d.is_dim)[0];
|
||||
const formData = {
|
||||
datasource: `${data.table_id}__table`,
|
||||
metrics: [],
|
||||
groupby: [],
|
||||
viz_type: 'table',
|
||||
since: '100 years ago',
|
||||
all_columns: columns.map(c => c.name),
|
||||
row_limit: 1000,
|
||||
};
|
||||
if (mainGroupBy) {
|
||||
formData.groupby = [mainGroupBy.name];
|
||||
}
|
||||
this.props.actions.addInfoToast(t('Creating a data source and creating a new tab'));
|
||||
|
||||
// open new window for data visualization
|
||||
|
|
Loading…
Reference in New Issue