| title | How to manage a notebook |
|---|---|
| description | Learn how to manage notebooks in Azure Data Studio. This includes opening notebooks, saving them, and changing your SQL connection or Python kernel. |
| author | markingmyname |
| ms.author | maghan |
| ms.reviewer | achatter, alayu, mikeray |
| ms.metadata | seo-lt-2019 |
| ms.topic | conceptual |
| ms.prod | azure-data-studio |
| ms.technology | |
| ms.custom | |
| ms.date | 04/27/2020 |
[!INCLUDESQL Server 2019]
This article shows you how to open and save notebook files in Azure Data Studio. It also demonstrates how to change your connection to your SQL Server or Python kernel.
There are several ways to open the Open Notebook dialog. You can use the File menu, the Dashboard, and the Command Palette. The following sections describe each method.
Select File Open from the File menu Ctrl+O (in Windows) and Cmd+O (in Mac).
Click Open Notebook in the dashboard to open the File Open dialog.
Use command File: Open from command palette by typing Ctrl+Shift+P (in Windows) and Cmd+Shift+P (in Mac).
There's currently one way to save a notebook. Select Save from the notebook toolbar.
Note
The following methods currently do not save changes to notebooks:
- File Save, File Save As... and File Save All commands from the File menu.
- File: Save commands entered in the command palette.
To change the SQL connection for a notebook:
-
Select the Attach to menu from the notebook toolbar and then select Change Connection.
-
Now you can either select a recent connection server or enter new connection details to connect.
The first time you open Azure Data Studio, the Configure Python for Notebooks page is displayed. You can select either:
- New Python installation to install a new copy of Python for Azure Data Studio, or
- Use existing Python installation to specify the path to an existing Python installation for Azure Data Studio to use
To view the location and version of the active Python kernel, create a code cell and run the following Python commands:
import os
import sys
print(sys.version_info)
print(os.path.dirname(sys.executable))To change to a different installation of Python:
- From the File menu, select Preferences and then Settings.
- Scroll to Notebook configuration under Extensions.
- Under Use Existing Python, uncheck the option "Local path to a preexisting python installation used by Notebooks."
- Restart Azure Data Studio.
When the Configure Python for Notebooks page is displayed, you can choose to create a new Python installation or specify a path to an existing installation.
For more information about SQL notebooks in Azure Data Studio, see How to use notebooks in SQL Server 2019.





