Skip to content

Commit ecc7f80

Browse files
Merge pull request #89355 from SnehaGunda/LandingPage2
Adding Jupyter notebook overview doc
2 parents e3cf73c + f6a7ec7 commit ecc7f80

File tree

4 files changed

+63
-6
lines changed

4 files changed

+63
-6
lines changed

articles/cosmos-db/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@
227227
href: spark-api-introduction.md
228228
- name: Lambda architecture
229229
href: lambda-architecture.md
230+
- name: Built-in analytics with Jupyter notebooks
231+
items:
232+
- name: Jupyter notebooks overview
233+
href: cosmosdb-jupyter-notebooks.md
230234
- name: Server-side programming
231235
items:
232236
- name: Stored procedures, triggers, and UDFs
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Introduction to the built-in Jupyter notebooks support in Azure Cosmos DB
3+
description: Learn how you can use the built-in Jupyter notebooks support in Azure Cosmos DB to interactively run queries.
4+
ms.service: cosmos-db
5+
ms.topic: overview
6+
ms.date: 09/22/2019
7+
author: rimman
8+
ms.author: rimman
9+
---
10+
11+
# Built-in Jupyter notebooks support in Azure Cosmos DB
12+
13+
Jupyter notebook is an open-source web application that allows you to create and share documents containing live code, equations, visualizations, and narrative text. Azure Cosmos DB supports built-in Jupyter notebooks for all APIs such as Cassandra, MongoDB, SQL, Gremlin, and Table. The built-in notebook support for all Azure Cosmos DB APIs and data models allows you to interactively run queries. The Jupyter notebooks run within the Azure Cosmos accounts and they enable developers to perform data exploration, data cleaning, data transformations, numerical simulations, statistical modeling, data visualization, and machine learning.
14+
15+
The Jupyter notebooks supports magic functions that extend the capabilities of the kernel by supporting additional commands. Cosmos magic is a command that extends the capabilities of the Python kernel in Jupyter notebook so you can run Azure Cosmos SQL API queries in addition to Apache Spark. You can easily combine Python and SQL API queries to query and visualize data by using rich visualization libraries integrated with render commands.
16+
Azure portal natively integrates Jupyter notebook experience into Azure Cosmos accounts as shown in the following image:
17+
18+
![Jupyter notebooks support in Azure Cosmos DB](./media/cosmosdb-jupyter-notebooks/jupyter-notebooks-portal.png)
19+
20+
## Benefits of Jupyter notebooks
21+
22+
Jupyter notebooks were originally developed for data science applications written in Python, R. However, they can be used in various ways for different kinds of projects such as:
23+
24+
* ***Data visualizations:** Jupyter notebooks allow you to visualize data in the form of a shared notebook that renders some data set as a graphic. Jupyter notebook lets you author visualizations, share them, and allow interactive changes to the shared code and data set.
25+
26+
* **Code sharing:** Services like GitHub provide ways to share code, but they’re largely non-interactive. With a Jupyter notebook, you can view code, execute it, and display the results directly in the Azure portal.
27+
28+
* **Live interactions with code:** Jupyter notebook code is dynamic; it can be edited and re-run incrementally in real time. Notebooks can also embed user controls (e.g., sliders or text input fields) that can be used as input sources for code, demos or Proof of Concepts(POCs).
29+
30+
* **Documentation of code samples and outcomes of data exploration:** If you have a piece of code and you want to explain line-by-line how it works in Azure Cosmos DB, with real-time output all along the way, you could embed it in a Jupyter Notebook. The code will remain fully functional. You can add interactivity along with the documentation at the same time.
31+
32+
* **Cosmos magic commands:** In Jupyter notebooks, you can use custom magic commands for Azure Cosmos DB to make interactive computing easier. For example, the %%sql magic that allows one to query a Cosmos container using SQL API directly in a notebook.
33+
34+
* **All in one place environment:** Jupyter notebooks combine code, rich text, images, videos, animations, mathematical equations, plots, maps, interactive figures, widgets, and graphical user interfaces into a single document.
35+
36+
## Components of a Jupyter notebook
37+
38+
Jupyter notebooks can include several types of components, each organized into discrete blocks:
39+
40+
* **Text and HTML:** Plain text, or text annotated in the markdown syntax to generate HTML, can be inserted into the document at any point. CSS styling can also be included inline or added to the template used to generate the notebook.
41+
42+
* **Code and output:** Jupyter notebooks support Python code. The results of the executed code appear immediately after the code blocks, and the code blocks can be executed multiple times in any order you like.
43+
44+
* **Visualizations:** Graphics and charts can be generated from the code, using modules like Matplotlib, Plotly, or Bokeh. Similar to the output, these visualizations appear inline next to the code that generates them.
45+
46+
* **Multimedia:** Because Jupyter notebook is built on the web technology, it can display all the types of multimedia supported in a web page. You can include them in a notebook as HTML elements, or you can generate them programmatically by using the `IPython.display` module.
47+
48+
* **Data:** Data from Azure Cosmos containers and results of the queries can be imported into a Jupyter notebook programmatically. For example, by including code in the notebook to query the data using any of the Cosmos DB APIs or natively built-in Apache Spark.
49+
50+
## Next steps
51+
52+
To get started with built-in Jupyter notebooks in Azure Cosmos DB see the following articles:
53+
54+
* [How to create a notebook]()
55+
* [How to install dependencies in a notebook]()
56+
* [How to use a notebook and Cosmos magic extension to analyze data]()
57+
58+
59+

articles/cosmos-db/spark-api-introduction.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,6 @@ The following image shows how Azure Cosmos DB’s Spark support is used in gamin
132132

133133
![Azure Cosmos DB’s Spark support in gaming analytics](./media/spark-api-introduction/gaming-analytics.png)
134134

135-
## Built-in Jupyter notebooks support
136-
137-
Azure Cosmos DB supports built-in Jupyter notebooks for all APIs such as Cassandra, MongoDB, SQL, Gremlin, and Table. The Jupyter notebooks run within the Azure Cosmos accounts and they enhance the developer experience. The built-in notebook support for all Azure Cosmos DB APIs and data models allows you to interactively run queries. You can also execute machine learning models, and analyze the data stored in your Azure Cosmos databases. By using the Jupyter notebook experience, you can analyze the stored data, build and train machine learning models, and perform inferencing on the data in the Azure portal as shown in the following image:
138-
139-
![Jupyter notebooks support in Azure Cosmos DB](./media/spark-api-introduction/jupyter-notebooks-portal.png)
140-
141135
## Next steps
142136

143137
* To learn about the benefits of Azure Cosmos DB, see the [overview](introduction.md) article.

0 commit comments

Comments
 (0)