Skip to content

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

Merged
betodealmeida merged 1 commit into
masterfrom
sql-parse-error
Oct 4, 2024
Merged

betodealmeida merged 1 commit into
masterfrom
sql-parse-error

Conversation

@betodealmeida

Copy link
Copy Markdown
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
nyohasstium pushed a commit to Webgains/superset that referenced this pull request Jan 2, 2025
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 5.0.0 First shipped in 5.0.0 labels Jul 29, 2025
@rusackas
rusackas deleted the sql-parse-error branch August 12, 2025 22:59
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L sqllab:design Related to the SQL Lab UI/UX sqllab Namespace | Anything related to the SQL Lab 🚢 5.0.0 First shipped in 5.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants