Technology Blog Posts by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Swati_Singh
Product and Topic Expert
Product and Topic Expert
370

Using the Azure Cosmos DB adapter, you can pull data from various sources to the Azure Cosmos DB platform and also significantly reduce efforts required to create integration workflows.

What is Azure Cosmos DB?

Azure Cosmos DB is a platform as a service and a cloud-based NoSQL database by Azure. It is a fully managed, globally distributed JSON-based database that supports high-level horizontal scaling, replication, and partitioning.

Features of the new Azure Cosmos DB Adapter

  • Provides the ability to interact with entities such as Database, Container, and Document.
  • Supports standard CRUD (Create, Read, Update, and Delete) operations in Azure Cosmos DB.
  • Supports operations such as list, query, and replace on various entities in Azure Cosmos DB.
  • Efficiently handles large sets of documents with bulk operation capabilities.
  • Offers a range of authentication control options from full access to resource-based access using Master Key Token and Resource Token.

How does the adapter work?

Let’s look at a simple operation, List all documents in Azure Cosmos DB using the Azure Cosmos DB Adapter for SAP Integration Suite.

List Documents from a Container in an Azure Cosmos DB Database

Before we begin, it is assumed that document-type records are available in Azure Cosmos DB for querying. Our example illustrates how the Cosmos DB Adapter allows querying to read documents. The integration flow begins with a client initiating a request to an endpoint to retrieve contact information from Azure Cosmos DB.

ashishkuvvarapu_0-1739171615042.png

How to Connect to Azure Cosmos DB?

  

ashishkuvvarapu_1-1739171646364.png

ParameterDescription
AddressSpecify the address as https://{databaseaccount}.documents.azure.com:443/
AuthenticationSelect authentication as Master Key.

Key Alias

Set as AzureCosmosMasterKey.
Reuse ConnectionEnable this property to reuse the connection.

Connection Timeout (in ms)

Set as 60000.
Response Timeout (in ms)Set as 60000.

Execute List using the Azure Cosmos DB Adapter

ashishkuvvarapu_2-1739171949591.png

To retrieve the list of documents, you can choose between two processing modes. In Single processing mode, specify the API Version, set the entity to Document, and the operation to List. For this configuration, you will need to provide the Database ID and Container ID where the documents are stored.

In Bulk processing mode, various operations on the document entity are supported. The client system will receive and process the response to extract the list of documents available within the database and container (collection).

Azure Cosmos Adapter DB Documentation

For detailed information about Azure Cosmos DB adapter configuration, see Azure Cosmos DB Receiver Adapter and Azure Cosmos DB Adapter Guide.

Note: The Azure Cosmos DB adapter is available as part of your SAP Integration Suite license.