-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
[SIP-132] Proposal for SQL Lab addon plugins #28485
Comments
Thanks @justinpark, a few questions:
|
Thank you @justinpark. It's just the beginning of the discussion, given the complexity of the topic, but I would like to add something about the following:
It's really important that what we expose to the plugins should be defined under a versioned API instead of internal structures. The Redux state and actions are internal structures that can be changed at any time and are not versioned. Having a clear defined API is important to avoid the situation where plugins break because of internal changes and to provide clarity for plugin authors about the resources that they have access to in a particular version. |
I echo all of @geido's questions - particularly about the applicability to other areas of Superset. Our viz plugins, dashboard component extensions, etc. There are about a million places we'll want to add plugins eventually (formatters, advanced types, "export as" options, etc), so it would be great to arrive at an architecture that's repeatable/reusable for all of this an clean up house. In a perfect world, I'd love to see these plugins managed through the UI (like an IDE does) where one can simply add npm URLs, and each "plugin" has its own webpack/tsconfig, so you simply point Superset at the bundle and load it dynamically. This would kick the doors open for a highly extensible Superset experience. I'm guessing from the video that there's already some code that would be good to upstream. I love that advantage, but at the same time, I want to make sure we nail this... because if we do, it'll be an absolute game-changer for Superset. |
Hey @justinpark - just wondering if there's more to tackle in the discussion here of if this is ready for a VOTE. |
[SIP-132] Proposal for SQL Lab addon plugins
Motivation
We have a couple of exciting SQL Lab integration ideas, and one of them is the text-to-SQL feature. However, we have encountered a limitation with the prototype due to the lack of layout space. Currently, users can only input queries in one line without the ability to trace their chat or query history.
Additionally, while the left bar table selector is helpful, it may not always be necessary. If we are able to utilize the layout space more effectively, we can address these limitations and provide enhanced functionality.
The SQL Lab addon plugins bring a host of benefits to Apache Superset users, similar to how VSCode extensions enhance the coding experience in VSCode. By leveraging these plugins, user can extend sql editing capabilities, improve productivity, and unlock new possibilities for data exploration and analysis.
Proposed Change
While we will still keep the existing table schema explore in the left bar layout, we are also introducing an extra tab that provides a different user interface.
sqllab-addon-intro.mov
Think of it as similar to the VSCode extensions concept. Users will have the flexibility to explore and choose from a variety of addons based on their needs. These addons can be accessed from the "addon store" tab, which will be conveniently located as the last tab. From there, users can easily add or remove available extensions(like chart plugins) as per their preference.
We also encourage community collaboration by allowing open-source contributions to the available extensions.
This will further enrich the options and functionalities for our users.
Additionally, for company-specific requirements, there is the possibility of incorporating custom addons through overrides.
New or Changed Public Interfaces
Here is the proposed basic folder structure for each extension:
We will provide an interface to access the current query editor context.
E.g. You can access the current executed query result by extracting the record from
queriesSelector
using thelatestQueryId
fromuseQueryEditor
The SqlLabAddonRegistry will import all public extensions under
src/SqlLab/addons
.Additional custom extensions can be added through the overrides
setupSqlLabAddons
configuration.New Dependencies
We will store the currently activated addon list(e.g. sqllab_current_addons: ['addon_key1', 'addon_key2']) for the user in localStorage first.
And then, once it's ready, we can migrate this data to the user preference database.
Migration Plan and Compatibility
I do not for-see any migration required.
Rejected Alternatives
None
The text was updated successfully, but these errors were encountered: