At Build 2017, Microsoft introduced Azure Cosmos DB as a NoSQL database service with multiple models and APIs. All Azure DocumentDB subscribers have been upgraded to Cosmos DB at this point. Last year, a major UI upgrade was introduced in the form of a new Cosmos DB Explorer for the cloud service.
Microsoft announced today that integrated Jupyter notebooks are now generally available in Cosmos DB. A preview of this feature was released earlier this year, along with a similar form of support for Apache Spark. In particular, Microsoft recently integrated Jupyter notebooks into Visual Studio Code by supporting PySpark development of SQL Server 2019 Big Data Clusters.
The notebooks are linked directly to the Azure portal and all Cosmos accounts, and all data models and APIs are compatible with this version. These include Cassandra, MongoDB, SQL (Core), Gremlin, and Spark. The following tasks can be performed from Jupyter notebooks:
- Run queries interactively
- Explore and analyze data
- Visualize data
- Build, train, and execute machine learning and AI models
When it comes to querying data, Microsoft has introduced some built-in commands to make the process easier. For example, any SQL query with the %% sql magic command in Portal can be executed against a container without having to make any changes to the configurations. In terms of data visualization, these notebooks come with a number of built-in packages including Pandas, Matplotlib, and more.
In addition, version 4 of the Azure Cosmos DB Python SDK for SQL API is offered as part of this package. This SDK can be used directly from notebooks to take advantage of the latest improvements in performance and usability. Therefore, SDK operations such as creating new databases and importing data can be performed without installing other packages.
For more information on activating notebooks in an existing account or creating a new Cosmos account, please visit here. Microsoft is also trying to make notebook use a more collaborative process. Users can share their favorite notebooks with the community through the GitHub repo for Azure Cosmos DB Notebooks. Additionally, using the hashtags #CosmosDB, #CosmicNotebooks, and #PoweredByCosmos with your notebooks on social media can lead to Microsoft promoting them around the world.