What pain point is this feature intended to address? Please describe.
There are several situations where it would be helpful to allow a notebook to provide some sort of persistent support for data access. Specific use cases that I have in mind are:
Bokeh allows the creation of "widgets" where users can write python code that is reactively executed to construct a visualization as the widgets are modified. This requires support from the backend, but that doesn't work if we have to kill the python interpreter.
I got a request for the ability to connect to a notebook to expose specific querying functionality. We have the ability to support SQL over any dataset artifact, but it might be helpful/more performant to expose e.g., scala methods that access the data directly.
Describe the solution you'd like
Allow notebooks to define new endpoints that allow users to invoke function artifacts. I'm not entirely sure what this should look like, but a few ideas:
Define a new Service Endpoint Artifact and allow python/scala cells to declare these (e.g., using a syntax like that of Flask/Cask)
Create a "Publish Function" cell / extend the "Publish Dataset" cell to allow functions to be exposed to other notebooks, and add a toggle to allow access via a special API endpoint.
Describe alternatives you've considered
The only real existing alternative is to dump everything you want to query into a dataset or view, and query that via SQL.
What pain point is this feature intended to address? Please describe. There are several situations where it would be helpful to allow a notebook to provide some sort of persistent support for data access. Specific use cases that I have in mind are:
Describe the solution you'd like Allow notebooks to define new endpoints that allow users to invoke function artifacts. I'm not entirely sure what this should look like, but a few ideas:
Describe alternatives you've considered The only real existing alternative is to dump everything you want to query into a dataset or view, and query that via SQL.