Notebook
class Notebook
An interface for working with notebooks on Redivis.
Constructors
Get a reference to the current notebook. Can only be called from within a running Redivis notebook.
redivis.notebook
(name)
Create a reference to a notebook based on its (qualified) name
Return a notebook within a specific workflow.
Returns a list of Notebooks within a workflow
Constructors
Examples
username = "imathews"
workflow_name = "example_workflow_climate_analysis:x7kh"
notebook_name = "visualize_precipitation_trends:2f2v"
notebook = redivis.notebook(f"{username}.{workflow_name}.{notebook_name}")
notebook.run()
Attributes
workflow
A reference to the Workflow instance that is associated with this notebook.
properties
A dict containing the API resource representation of the notebook. This will only be populated after certain methods are called, particularly the get
method, and will otherwise be None
.
qualified_reference
The fully qualified reference to this notebook
For example,
imathews.example_workflow_climate_analysis:x7kh.visualize_precipitation_trends:2f2v
scoped_reference
The canonical reference for the notebook, without any qualifiers. E.g., visualize_precipitation_trends:2f2v
Methods
notebook.create_output_table
(data[, ...])
Create or append to an output table, using data from within the (running) notebook.
Fetches the notebook, after which notebook.properties will contain a dict with entries corresponding to the properties on the notebook resource definition. Will raise an error if the notebook does not exist.
Check whether the notebook exists.
Get a reference to the notebook's output table, if it exists.
notebook.run
([,* wait_for_finish=True])
Run a notebook.
Get an ordered list of the notebook's source tables.
Stop a running notebook.
Last updated
Was this helpful?