-
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
chore: Migrate SqlLab API to API v1 #22661
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22661 +/- ##
===========================================
- Coverage 67.00% 56.00% -11.00%
===========================================
Files 1859 1868 +9
Lines 71103 71422 +319
Branches 7782 7782
===========================================
- Hits 47643 40002 -7641
- Misses 21434 29394 +7960
Partials 2026 2026
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Great initiative! Left some comments - especially the OpenAPI schemas are needed. Also, we should replace the old integration tests with new ones that cover the main use cases.
queries: Dict[str, Any] = {} | ||
|
||
# These are unnecessary if sqllab backend persistence is disabled | ||
if is_feature_enabled("SQLLAB_BACKEND_PERSISTENCE"): |
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.
As SQLLAB_BACKEND_PERSISTENCE
has been enabled for quite some time by default, I wonder if we should just remove the FF and clean up these conditionalities. Thoughts @dpgaspar @betodealmeida ?
def get(self) -> Response: | ||
"""Assembles SqlLab related information (defaultDbId, tab_state_ids, active_tab) | ||
in a single endpoint. | ||
""" |
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.
Superseded by #22809, closing |
I'm trying to use the SqlLab API that has recently been migrated to api/v1/sqllab and am having some difficulties. I can get the api/v1/sqllab/execute endpoint to work fine but don't seem to be able to successfully do an async execute followed by a api/v1/sqllab/results call to get the resulting data rows of the execute. Also I'd like to get the rows in chunks instead of all at once but am unsure if this is supported. Example Python code of an async execute followed by one or more results calls would be very helpful. |
SUMMARY
Created
api/v1/sqllab/
API for future SPA migration of SQL LabMigrated
superset/sql_json/
to/api/v1/sqllab/execute/sql/
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION