feat: Live query validation in the SQL Lab UI#7461
Merged
xtinec merged 2 commits intoMay 6, 2019
Conversation
This builds on apache#7422 to build check-as-you-type sql query validation in Sql Lab. This closes apache#6707 too. It adds a (debounced) call to the validate_sql_json API endpoint with the querytext, and on Lyft infra is able to return feedback to the user (end to end) in $TBD seconds. At present feedback is provided only through the "annotations" mechanism build in to ACE, although I'd be open to adding full text elsewhere on the page if there's interest.
Contributor
|
Adding @kristw and @williaster for :eyes |
khtruong
reviewed
May 6, 2019
| this.setState({ sql }); | ||
| // Request server-side validation of the query text | ||
| if (this.canValidateQuery()) { | ||
| // NB. requestValidation is debounced |
Contributor
Author
There was a problem hiding this comment.
I never realized that was weird, but I guess it is a bit now that I think about it!
NB means "nota bene", latin for "note well" — I usually use it in comments where "NOTE:" would also work
khtruong
approved these changes
May 6, 2019
bearcage
pushed a commit
to bearcage/incubator-superset
that referenced
this pull request
May 15, 2019
* [WIP] Live query validation, where supported This builds on apache#7422 to build check-as-you-type sql query validation in Sql Lab. This closes apache#6707 too. It adds a (debounced) call to the validate_sql_json API endpoint with the querytext, and on Lyft infra is able to return feedback to the user (end to end) in $TBD seconds. At present feedback is provided only through the "annotations" mechanism build in to ACE, although I'd be open to adding full text elsewhere on the page if there's interest. * fix: Unbreak lints and tests
xtinec
pushed a commit
that referenced
this pull request
May 15, 2019
* [WIP] Live query validation, where supported This builds on #7422 to build check-as-you-type sql query validation in Sql Lab. This closes #6707 too. It adds a (debounced) call to the validate_sql_json API endpoint with the querytext, and on Lyft infra is able to return feedback to the user (end to end) in $TBD seconds. At present feedback is provided only through the "annotations" mechanism build in to ACE, although I'd be open to adding full text elsewhere on the page if there's interest. * fix: Unbreak lints and tests
bearcage
pushed a commit
to bearcage/incubator-superset
that referenced
this pull request
May 15, 2019
) * [WIP] Live query validation, where supported This builds on apache#7422 to build check-as-you-type sql query validation in Sql Lab. This closes apache#6707 too. It adds a (debounced) call to the validate_sql_json API endpoint with the querytext, and on Lyft infra is able to return feedback to the user (end to end) in $TBD seconds. At present feedback is provided only through the "annotations" mechanism build in to ACE, although I'd be open to adding full text elsewhere on the page if there's interest. * fix: Unbreak lints and tests
xtinec
pushed a commit
that referenced
this pull request
May 15, 2019
* [WIP] Live query validation, where supported This builds on #7422 to build check-as-you-type sql query validation in Sql Lab. This closes #6707 too. It adds a (debounced) call to the validate_sql_json API endpoint with the querytext, and on Lyft infra is able to return feedback to the user (end to end) in $TBD seconds. At present feedback is provided only through the "annotations" mechanism build in to ACE, although I'd be open to adding full text elsewhere on the page if there's interest. * fix: Unbreak lints and tests
qfcwell
pushed a commit
to qfcwell/superset
that referenced
this pull request
May 12, 2026
) (apache#7518) * [WIP] Live query validation, where supported This builds on apache#7422 to build check-as-you-type sql query validation in Sql Lab. This closes apache#6707 too. It adds a (debounced) call to the validate_sql_json API endpoint with the querytext, and on Lyft infra is able to return feedback to the user (end to end) in $TBD seconds. At present feedback is provided only through the "annotations" mechanism build in to ACE, although I'd be open to adding full text elsewhere on the page if there's interest. * fix: Unbreak lints and tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CATEGORY
Choose one
SUMMARY
This builds on #7422 to build check-as-you-type sql query validation in Sql Lab. This closes #6707 too.
This adds a (debounced) call to the
validate_sql_jsonAPI endpoint with the querytext. If no validator is configured for the selected database, per the feature flag from #7422, no validation requests will be sent from the UI. On Lyft's infra the presto validator is able to return feedback to the user (end to end) in about 2 seconds.At present feedback is provided only through the "annotations" mechanism build in to ACE, although I'd be open to adding full text elsewhere on the page if there's interest.
This diff does not include new cypress tests covering this interaction.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Server error reporting:

Query error reporting:

TEST PLAN
You can verify the unhappy paths by:
ADDITIONAL INFORMATION
REVIEWERS
@xtinec @DiggidyDave @khtruong @betodealmeida