Amazon Redshift will no longer support the creation of new Python UDFs starting November 1, 2025.
If you would like to use Python UDFs, create the UDFs prior to that date.
Existing Python UDFs will continue to function as normal. For more information, see the
blog post
Creating a notebook
You can create a notebook to organize, annotate, and share multiple SQL queries in a single document.
To create a notebook
-
From the navigator menu, choose the Editor icon (
). -
Choose the plus icon (
), and then choose Notebook.By default, a SQL query cell appears in the notebook.
-
In the SQL query cell, do one of the following:
-
Enter a query.
-
Paste a query that you copied.
-
-
(Optionally) Choose the plus icon (
), then choose Markdown to add a
Markdown cell where you can provide descriptive or explanatory text using
standard Markdown syntax. -
(Optionally) Choose the plus icon (
), then choose SQL to insert a SQL
cell.
You can rename notebooks using the pencil icon (
).
From the menu icon (
), you can also perform the following operations on a
notebook:
-
Share with my team – To share the notebook with your
team as defined by tags. To share a notebook with your team, make sure that you
have the principal tag sqlworkbench-teamset to the same value as the rest of your team members in your account. For example, an administrator might set the value toaccounting-teamfor everyone in the accounting department. For an example, see Permissions required to use the query editor v2 . -
Export – To export the notebook to a local file with
the .ipynbextension. -
Import query – To import a query from a local file
into a cell in the notebook. You can import files with .sqland.txtextensions. -
Save version – To create a version of the notebook.
To see versions of a notebook, navigate to your saved notebooks and open
Version history. -
Duplicate – To create a copy of the notebook and
open it in a new notebook tab. -
Shortcuts – To display the shortcuts available when
authoring a notebook.