title | description | author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|
Enable notebooks in the Azure Cosmos DB account (preview) |
Azure Cosmos DB's built-in notebooks enable you to analyze and visualize your data from within the Portal. This article describes how to enable this feature for Cosmos accounts. |
deborahc |
cosmos-db |
how-to |
09/22/2019 |
dech |
Important
Built-in notebooks for Azure Cosmos DB are currently available in the following Azure regions: Australia East, East US, East US 2, North Europe, South Central US, Southeast Asia, UK South, West Europe and West US 2. To use notebooks, create a new account with notebooks or enable notebooks on an existing account in one of these regions.
Built-in Jupyter notebooks in Azure Cosmos DB enable you to analyze and visualize your data from the Azure portal. This article describes how to enable this feature for your Azure Cosmos DB account.
-
Sign into the Azure portal.
-
Select Create a resource > Databases > Azure Cosmos DB.
-
On the Create Azure Cosmos DB Account page, select Notebooks.
:::image type="content" source="media/enable-notebooks/create-new-account-with-notebooks.png" alt-text="Select notebooks option in Azure Cosmos DB Create blade":::
-
Select Review + create. You can skip the Network and Tags option.
-
Review the account settings, and then select Create. It takes a few minutes to create the account. Wait for the portal page to display Your deployment is complete.
:::image type="content" source="media/enable-notebooks/create-new-account-with-notebooks-complete.png" alt-text="The Azure portal Notifications pane":::
-
Select Go to resource to go to the Azure Cosmos DB account page.
:::image type="content" source="../../includes/media/cosmos-db-create-dbaccount/azure-cosmos-db-account-created-3.png" alt-text="The Azure Cosmos DB account page":::
-
Navigate to the Data Explorer pane. You should now see your notebooks workspace.
:::image type="content" source="media/enable-notebooks/new-notebooks-workspace.png" alt-text="New Azure Cosmos DB notebooks workspace":::
You can also enable notebooks on existing accounts. This step needs to be done only once per account.
-
Navigate to the Data Explorer pane in your Cosmos account.
-
Select Enable Notebooks.
:::image type="content" source="media/enable-notebooks/enable-notebooks-workspace.png" alt-text="Create a new notebooks workspace in Data Explorer":::
-
This will prompt you to create a new notebooks workspace. Select Complete setup.
-
Your account is now enabled to use notebooks!
To verify that you can use notebooks, select one of notebooks under Sample Notebooks. This will save a copy of the notebook to your workspace and open it.
In this example, we'll use GettingStarted.ipynb.
:::image type="content" source="media/enable-notebooks/select-getting-started-notebook.png" alt-text="View GettingStarted.ipynb notebook":::
To run the notebook:
-
Select the first code cell that contains Python code.
-
Select Run to run the cell. You can also use Shift + Enter to run the cell.
-
Refresh the resource pane to see the database and container that has been created.
:::image type="content" source="media/enable-notebooks/run-first-notebook-cell.png" alt-text="Run getting started notebook":::
You can also select New Notebook to create a new notebook or upload an existing notebook (.ipynb) file by selecting Upload File from the My Notebooks menu.
:::image type="content" source="media/enable-notebooks/create-or-upload-new-notebook.png" alt-text="Create or upload a new notebook":::
- Learn about the benefits of Azure Cosmos DB Jupyter notebooks