# 2.3 Upload, download, and manage data with Azure Storage Explorer
# Create a storage account and add a blob
# Create a storage accunt
az storage account create \
--name mslearn$RANDOM \
--resource-group [sandbox resource group name] \
--sku Standard_GRS \
--kind StorageV2
1
2
3
4
5
2
3
4
5
# 2.3.5 Connect Azure Storage Explorer to Azure Cosmos DB and Data Lake
# Use Storage Explorer to manage Azure Cosmos DB
# Create a Cosmos DB account
# Create a Cosmos DB account
export NAME=cosmos$RANDOM
az cosmosdb create \
--name $NAME \
--kind GlobalDocumentDB \
--resource-group [sandbox resource group name]
1
2
3
4
5
2
3
4
5
# Obtain your Cosmos DB connection string
az cosmosdb keys list \
--name $NAME \
--resource-group [Sandbox resource group] \
--type keys
1
2
3
4
2
3
4
You should get something like this back:
{
"primaryMasterKey": "9xuqPVI9AlJgSnOtJKspKGWtKxJRNZgXk5JLoXiaoMJJCGRBmxrspjmJv577W9eSPOQDuniBvgCwogWmr7z6vw==",
"primaryReadonlyMasterKey": "NzllFVsC64Z9EPxAIIdb9gIDtUoGaIoI2rolLKRf62CgdOjQIKUt33va1YfByju1oYFMyBpQeumJt6TyiwM2TA==",
"secondaryMasterKey": "RsALCKV6YbAASu8ZdNPoYXVJYhU9bZsOdZhOKxkgDaEjYcsNEu4XXLPc02CwgMzlx8R6768Oy2Bx8bGK37dYAA==",
"secondaryReadonlyMasterKey": "9OZNISEi1CW5VYW2viVZ8S0PbQQyHNWw1vBFwCqGrfqO81SN56CscmovqCH8MdXTO5zhp08xp8Y2VNH9bK1Aaw"
}
1
2
3
4
5
6
2
3
4
5
6
# You can now form a connection string based on this information
AccountEndpoint=https://<YOUR-COSMOS-DB-NAME>.documents.azure.com:443/;AccountKey=<PRIMARY-MASTER-KEY>;
1
# Create a Data Lake Storage Gen2 account
# Add the storage-preview extension, as Gen2 is still in preview
(I'm not sure this is actually necessary...)
az extension add --name storage-preview
1
# Create the Data Lake Storage Gen2 account
az storage account create \
--name dlstoragetest$RANDOM \
--resource-group learn-364c2b18-959e-48d4-af8f-c71d861135e3 \
--location westus2 \
--sku Standard_LRS \
--kind StorageV2 \
--hierarchical-namespace true
1
2
3
4
5
6
7
2
3
4
5
6
7