[sql lab - explore flow] make sure groupby is empty (#5596)

This commit is contained in:
Maxime Beauchemin 2018-08-09 14:48:36 -07:00 committed by GitHub
parent 21bf8d9f8f
commit 682ca3874e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -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