Using Snowflake notebooks

Snowflake CLI includes the following snow notebook commands that let you create and execute Snowflake notebooks from the command line:

Create a notebook

The snow notebook create command creates a notebook from an existing notebook on stage. The command returns a link to the new notebook. The following example creates the MY_NOTEBOOK notebook from the specified staged notebook:

snow notebook create MY_NOTEBOOK -f @MY_STAGE/path/to/notebook.ipynb
Copy

The command creates the notebook in the default warehouse defined for the connection. You can use the --warehouse option to specify an alternative warehouse or to specify one if the connection doesn’t define a default warehouse.

Execute a notebook

The snow notebook execute command executes a notebook in headless mode. Currently, the command only returns a message indicating whether the notebook executed successfully.

snow notebook execute MY_NOTEBOOK
Copy
Notebook MY_NOTEBOOK executed.