-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add ability to open query in Iodide #426
Comments
We also talked a bit about adding some kind of POST function on the side of an iodide server to create a notebook with a specific payload, which would allow (for example) prepopulating the data for a query inside an iodide cell. Let's circle back to this once we have a bit more of a server-side implementation in place. |
Ah right, so a possible UX flow would be:
|
I spoke with William about this yesterday. He was saying that, for now, we may want to send only JSMD over POST. The JSMD will include code which loads data from Redash. In other words, the data itself wouldn't be sent over POST, but the code for loading that data would be. Let me know if that's a problem. |
@jezdez Can you point me in the right direction regarding building my first Redash plugin? Is there any documentation I should be looking at? |
@openjck There is no documentation to speak of right now, since the extension API is still in flux but we've made some progress fleshing it out in redash-stmo. My apologies, but I'm afraid you'll need to look at the existing extensions that both cover backend and simple frontend extensions, but I'll try to summarize the current design below. What is redash-stmo?redash-stmo is a Python package that contains several extensions, each using some and in some cases all abilities. Since Redash currently lacks the ability to install additional dependencies during deploy time, we install it in our fork. This means that
What is a Redash extension anyway?The current extension design is separated into three parts:
For example the extension to add a link to the Datasource documentation to the schema browser can be found here: redash_stmo/data_sources/link Backend extensionsA backend extension is simply Python code that is (e.g. It does that by scanning all installed Python packages for package metadata called "entry points" that are just dotted Python import paths pointing to a function, e.g.
Client extensionsClient extensions are React components that are wrapped in AngularJS modules (until Redash has been ported to React natively), located in So a Python package with an extension bundle could look like this:
Equally to the backend extensions, Redash will use the entry point system to find those bundle directories by deriving its file system path from the dotted Python import path of the Python module the Client extensions should define the entry point of the Python module with the bundle directory just like backend extensions in the pyroject.toml file. Once the client extension is part of the client application bundle, it'll need to be actually used in HTML files. That's sadly an unfinished part of the extension system at the moment and requires us to add it to our fork. E.g. the datasource link extension from above is included in frontend HTML file in our fork. In the future we hope to have a different system for this final piece of integration, e.g. pre-existing React components ("portals", "placeholders" etc) that we can register our extension components with. Alas that hasn't been tackled upstream yet. Periodic Celery tasksThis is an area of current discussion and we should probably not using this part of the extension API at the moment. Let me know if you have a strong use case for this. |
I should note that the redash-stmo repo is set up to allow development of extensions without knowing all of this, as long as the entry for a new extension is added to the |
Excellent. Thank you for this detailed information! I forgot that there were the existing extensions. Those, along with this documentation, will be a huge help. 🤗 |
This was done! 🥳 🎉 |
Following the discussion around #424 this is an issue to track the possibility to integrate Redash with Iodide(.io).
The general gist is:
@wlach do you remember any other things we talked about on IRC?
The text was updated successfully, but these errors were encountered: