Azure Logic Apps and CosmosDB
- Updated on 02 May 2019
- 1 minute to read
With Logic Apps you can persist JSON document in Azure Cosmos DB, a globally distributed, multi-model cloud NoSQL database service. The persistence is done through the Cosmos DB connector, a standard connector, available in all Azure regions.
When communicating with a Cosmos DB instance, i.e. database – a collection you require the account id and collection id, both available when you configure the connection to a Cosmos DB instance (account).
With the Cosmos DB connector, you can perform several actions ranging from creating or updating a document to calling a stored procedure. Furthermore, with each action, you can add one or more optional parameters. For instance, the create or update document has an optional parameter IsUpsert allowing you to override an existing document.
A potential use-case for persisting data in a Cosmos DB document collection can be log-data. The benefit of log-data in a Cosmos DB is that you integrate it with Azure Search. With Azure Search, you can index the document collection and do a full-text search and apply other search capabilities (scoring, ranking, facets, and sortings).