Azure cosmos DB

Analyze Azure Cosmos DB data using Synapse Link and Power BI

  • Article

Introduction In my last article, Using Azure Synapse Link for Azure Cosmos DB , I discussed creating the Synapse Link to query data present in Azure Cosmos DB from my Synapse workspace. Here, I will create a new database in the serverless SQL pool and create views based on the Cosmos DB JSON files. Then, I will […]

2021-01-12

734 reads

Powershell Script - Azure cosmos DB(SQL API)

  • Script

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.

2020-05-11 (first published: )

754 reads

Blogs

What is a model database?

By

Do you ever take a look at SSMS in the System Databases section? People...

Daily Coping 26 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Rowcount estimates when there are no Statistics

By

When you don't have statistics, what does SQL use to calculate the estimated number...

Read the latest Blogs

Forums

Issue in using Smartsheet CSharp SDK in SSIS Package

By rajeshlohar

Hi, I am using Smartsheet CSharp SDK in SSIS Script Task. I added it...

converting smallint to int in ssis

By frdrckmitchell7

Hi clever guys   I have two tables named dbo.jade.store and dbo.stage.Store.  The first...

Python Dictionary to DataFrame

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Python Dictionary to DataFrame

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers