Dnirmania


Technical Article

Powershell Script - Azure cosmos DB(SQL API)

Scripts contains 4 following functions. Users can create 3 different script from this for inserting, fetching and deleting a document.
1. Function Generate-MasterKeyAuthorizationSignature - This function is used to create connection to Azure cosmos DB. This function codes were taken from Technet.
2. Function Post-CosmosDb - Insert single document in azure cosmos DB. Same function can be used to perform bulkinsert. This function code was taken from following article. To make it useful i made some modification in it.
(https://www.systemcenterautomation.com/2018/06/cosmos-db-rest-api-powershell/)
3. Function Get-CosmosDocument - Fetch single document from azure cosmos DB. Same function can be used to fetch all documents from Cosmos DB.
4. Function Delete-CosmosDbDocument - Delete single document from cosmos DB. Same function can be used to delete more than one document with some additional codes.

To use any of the function like Post,Get, Delete. you have to comment the other 2 function call. If you are using all 3 functions(Post,Get, Delete), Be cautious while using them.

You rated this post out of 5. Change rating

2020-05-11 (first published: )

3,724 reads

Blogs

T-SQL Tuesday #186–Agent Jobs

By

It’s that time of the month again, when the T-SQL Tuesday blog party takes...

T-SQL Tuesday #186 - Agent Job History Visualization

By

I’m hosting T-SQL Tuesday this month and our topic is Managing SQL Agent Jobs....

KDA: Echoes of Deception - Case 2

By

The people of Digitown are being targeted by phishermen, and they need my help...

Read the latest Blogs

Forums

Execution Plan Operators

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Execution Plan Operators

Just To Talk – Your Safe Space for Online Therapy

By jfrankline378

Welcome to Just To Talk, your trusted platform for compassionate, confidential online therapy. At...

Merge spans with Dates Logic

By dhanekulakalyan

--for a given member if the startdate and endate is continous we need to...

Visit the forum

Question of the Day

Execution Plan Operators

When looking at an execution plan in SSMS, what types of operators are shown?

See possible answers