This repository makes use of .NET Interactive Workbooks, as part of Visual Studio Code. For more information, visit https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-interactive-vscode
-
Install the latest Visual Studio Code.
-
Install the latest .NET 6 SDK
-
Install .NET 3.1 SDK (used by cosmicworks command-line tool)
-
Install the .NET Interactive Notebooks extension from the marketplace.
-
Azure CLI and Azure PowerShell
sudo apt-get update
sudo apt-get install azure-cli
sudo apt-get install powershell
pwsh
Install-Module -Name Az -AllowClobber -Scope CurrentUser
- Install the cosmicworks command-line tool for global use on your machine.
dotnet tool install --global cosmicworks
Lab materials are available here
Self-paced modules on Microsoft Learn
az login
az account set --subscription "<subscriptionid>"
az group create --name rg-dp-420 --location westeurope
az cosmosdb create --name cosmos-dp-420-sql-provisioned --resource-group rg-dp-420
az cosmosdb create --name cosmos-dp-420-sql-serverless --resource-group rg-dp-420
COSMOS_DB_PROVISIONED_CONNECTION_STRING=$(az cosmosdb keys list --name cosmos-dp-420-sql-provisioned --resource-group rg-dp-420 --type connection-strings --query "connectionStrings[?description=='Primary SQL Connection String'].connectionString" --output tsv)
COSMOS_DB_SERVERLESS_CONNECTION_STRING=$(az cosmosdb keys list --name cosmos-dp-420-sql-serverless --resource-group rg-dp-420 --type connection-strings --query "connectionStrings[?description=='Primary SQL Connection String'].connectionString" --output tsv)
(in the notebooks we can get this through a powershell cell and share the result in a C# cell)
Connect-AzAccount
Set-AzContext -Subscription "b895a719-7034-411a-9944-ff196d1f450f"
$cosmosDBConnectionString = (Get-AzCosmosDBAccountKey -ResourceGroupName rg-dp-420 -Name cosmos-dp-420-sql-provisioned -Type "ConnectionStrings")["Primary SQL Connection String"]
#!share --from pwsh cosmosDBConnectionString
Console.WriteLine(cosmosDBConnectionString)
- Module 01: Get started with Azure Cosmos DB SQL API
- [notebook]
- [Learning path]
- [Lab]: Create an Azure Cosmos DB SQL API account
- Module 02: Plan and implement Azure Cosmos DB SQL API
- [notebook]
- [Learning path]
- [Lab]: Configure throughput for Azure Cosmos DB SQL API with the Azure portal
- [Lab]: Migrate existing data using Azure Data Factory
- Module 03: Connect to Azure Cosmos DB SQL API with the SDK
- [notebook]
- [Learning path]
- [Lab]: Connect to Azure Cosmos DB SQL API with the SDK
- [Lab]: Configure the Azure Cosmos DB SQL API SDK for offline development
- Module 04: Access and manage data with the Azure Cosmos DB SQL API SDKs
- [notebook]
- [Learning path]
- [Lab]: Create and update documents with the Azure Cosmos DB SQL API SDK
- [Lab]: Batch multiple point operations together with the Azure Cosmos DB SQL API SDK
- [Lab]: Move multiple documents in bulk with the Azure Cosmos DB SQL API SDK
- Module 05: Execute queries in Azure Cosmos DB SQL API
- [notebook]
- [Learning path]
- [Lab]: Execute a query with the Azure Cosmos DB SQL API SDK
- [Lab]: Paginate cross-product query results with the Azure Cosmos DB SQL API SDK
- Module 06: Define and implement an indexing strategy for Azure Cosmos DB SQL API
- [notebook]
- [Learning path]
- [Lab]: Review the default index policy for an Azure Cosmos DB SQL API container with the portal
- [Lab]: Configure an Azure Cosmos DB SQL API container’s index policy with the portal
- Module 07: Integrate Azure Cosmos DB SQL API with Azure services
- [notebook]
- [Learning path]
- [Lab]: Process change feed events using the Azure Cosmos DB SQL API SDK
- [Lab]: Process Azure Cosmos DB SQL API data using Azure Functions
- [Lab]: Search data using Azure Cognitive Search and Azure Cosmos DB SQL API
- Module 08: Implement a data modeling and partitioning strategy for Azure Cosmos DB SQL API
- [notebook]
- [Learning path]
- [Lab]: Measure performance of entities in separate and embeded containers
- [Lab]: Cost of denormalizing data and aggregates and using the change feed for referential integrity
- Module 09: Design and implement a replication strategy for Azure Cosmos DB SQL API
- [notebook]
- [Learning path]
- [Lab]: Connect to different regions with the Azure Cosmos DB SQL API SDK
- [Lab]: Configure consistency models in the portal and the Azure Cosmos DB SQL API SDK
- [Lab]: Connect to a multi-region write account with the Azure Cosmos DB SQL API SDK
- Module 10: Optimize query and operation performance in Azure Cosmos DB SQL API
- [notebook]
- [Learning path]
- [Lab]: Optimize an Azure Cosmos DB SQL API container indexing policy for write operations
- [Lab]: Optimize an Azure Cosmos DB SQL API container indexing policy for a query
- Module 11: Monitor and troubleshoot an Azure Cosmos DB SQL API solution
- [notebook]
- [Learning path]
- [Lab]: Use Azure Monitor to analyze an Azure Cosmos DB SQL API account
- [Lab]: Troubleshoot an application using the Azure Cosmos DB SQL API SDK
- [Lab]: Store Azure Cosmos DB SQL API account keys in Azure Key Vault
- Module 12: Manage an Azure Cosmos DB SQL API solution using DevOps practices
- [notebook]
- [Learning path]
- [Lab]: Adjust provisioned throughput using an Azure CLI script
- [Lab]: Create an Azure Cosmos DB SQL API container using Azure Resource Manager templates
- Module 13: Create server-side programming constructs in Azure Cosmos DB SQL API
- [notebook]
- [Learning path]
- [Lab]: Create a stored procedure with the Azure portal
- [Lab]: Implement and then use a UDF using the SDK