Skip to content

Notebook

Notebooks run Jupyter Notebook files, and can output content to the storage buckets defined in workflow_settings.yaml files.

You can create notebooks in the following ways. Available config options are defined in NotebookConfig, and are shared across all the following ways of creating notebooks.

Using action configs files:

definitions/actions.yaml
actions:
- notebook:
filename: name.ipynb
definitions/name.ipynb
{ "cells": [] }

Using the Javascript API:

definitions/file.js
notebook("name", { filename: "name.ipynb" })
definitions/name.ipynb
{ "cells": [] }

Naming the notebook:

By default a notebook action is named after its notebook file, without the extension: filename: name.ipynb creates a notebook called name. Set name in the config to override that. Other actions then refer to it by the new name, for example in dependencies. Because the name no longer comes from the file, one notebook file can back several notebook actions:

definitions/actions.yaml
actions:
- notebook:
filename: report.ipynb
name: daily_report

In the Javascript API the name is the first argument.

  • ActionBuilder‹Notebook›

    ↳ Notebook

▸ ipynb(contents: object): Notebook

Sets or overrides the contents of the notebook to run. Not recommended in general; using separate .ipynb files for notebooks is preferred.

Parameters:

NameType
contentsobject

Returns: Notebook