Skip to content
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

feat(SQL Lab): better SQL parsing error messages #30501

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

betodealmeida
Copy link
Member

SUMMARY

This PR introduces a new component for showing SQL parsing errors in SQL Lab (based on the exception raised by sqlglot), and also improves the <ErrorMessageWithStackTrace/> to show multiple error messages.

In the example below, there is an error parsing the query. When DML is enabled in the database Superset will run a query even if it can't parse it, but when it's disabled it raises an error. With the modifications, the user will see two error messages:

  1. The SQL can't be parsed; and
  2. Parsing is needed because DML is disabled.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2024-10-02 at 13-52-55 Superset

Screenshot 2024-10-02 at 13-53-03 Superset

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@betodealmeida betodealmeida marked this pull request as ready for review October 2, 2024 19:52
@dosubot dosubot bot added sqllab Namespace | Anything related to the SQL Lab sqllab:design Related to the SQL Lab UI/UX labels Oct 2, 2024
@betodealmeida betodealmeida merged commit a098809 into master Oct 4, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L sqllab:design Related to the SQL Lab UI/UX sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants