-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sql lab] simplify the visualize flow #5523
Conversation
The "visualize flow" linking SQL Lab to the "explore view" has never worked so great for people, here's a list of issues: * it's not really clear to users that their query is wrapped as a subquery, and the explore view runs queries on top of it
706242c
to
009028d
Compare
Codecov Report
@@ Coverage Diff @@
## master #5523 +/- ##
==========================================
- Coverage 63.29% 63.14% -0.15%
==========================================
Files 349 349
Lines 22151 22124 -27
Branches 2459 2452 -7
==========================================
- Hits 14020 13970 -50
- Misses 8117 8140 +23
Partials 14 14
Continue to review full report at Codecov.
|
this.state = { | ||
hints: [], | ||
}; | ||
this.visualize = this.visualize.bind(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can use autobind-decorators here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should introduce this decorator and attack the whole repo with it. In the meantime we have one less dependency and consistent-ish code (we have some binding done outside the constructors in many places...)
return datasourceName; | ||
} | ||
buildVizOptions() { | ||
const { schema, sql, dbId, templateParams } = this.props.query; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
return {
...this.props.query,
datasourceName: this.datasourceName(),
columns: this.getColumns(),
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are lots of other keys in the query
object we may not want to send over though :(
superset/views/core.py
Outdated
@@ -2201,8 +2202,9 @@ def sync_druid_source(self): | |||
def sqllab_viz(self): | |||
SqlaTable = ConnectorRegistry.sources['table'] | |||
data = json.loads(request.form.get('data')) | |||
from pprint import pprint | |||
pprint(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove pprint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
Nice, I really like the touch of the timeout dialog. |
@betodealmeida @hughhhh I addressed most comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
* [sql lab] simplify the visualize flow The "visualize flow" linking SQL Lab to the "explore view" has never worked so great for people, here's a list of issues: * it's not really clear to users that their query is wrapped as a subquery, and the explore view runs queries on top of it * lint + fix tests * Addressing comments (cherry picked from commit fe6846b)
* [sql lab] simplify the visualize flow The "visualize flow" linking SQL Lab to the "explore view" has never worked so great for people, here's a list of issues: * it's not really clear to users that their query is wrapped as a subquery, and the explore view runs queries on top of it * lint + fix tests * Addressing comments (cherry picked from commit fe6846b) (cherry picked from commit 5ba60d9)
* [sql lab] simplify the visualize flow The "visualize flow" linking SQL Lab to the "explore view" has never worked so great for people, here's a list of issues: * it's not really clear to users that their query is wrapped as a subquery, and the explore view runs queries on top of it * lint + fix tests * Addressing comments
The "visualize flow" linking SQL Lab to the "explore view" has never worked so great for people, the current flow is heavy and unintuitive. Now that we have the
MetricsControl
there's less need to define the metrics upfront.This new flow sends the user straight to the explore view using the table view with all columns (not grouped)