azure-cosmosdb

Are prepared statements supported with Azure Cosmos Cassandra API?

Are prepared statements supported with Azure Cosmos Cassandra API? Question: Are prepared statements supported with Azure Cosmos Cassandra API with Python? It appears not – when I execute stmt = session.prepare("SELECT provider FROM providers WHERE country_code=?") I get the following exception: Traceback (most recent call last): File "cosmos-cql.py", line 42, in <module> select_provider_stmt = session.prepare("SELECT …

Total answers: 2

Managing Connections in an Azure Serverless Function App

Managing Connections in an Azure Serverless Function App Question: Microsoft recommends you maintain a single instance of CosmosClient across your whole application, and I’m trying to achieve this in my Function App (with more than just CosmosClient). However, even when re-using both database & container proxies, I always see a warning that I have hit …

Total answers: 1

CosmosDB Python get multiple items

CosmosDB Python get multiple items Question: I’m using the CosmosDB noSQL API and I feel like I’m not doing it right. The methods in the container class all return these iterator objects, which only have one method: next(). I need to get a list of records out of my container, and my only thought is …

Total answers: 1

How to insert bulk data into Cosmos DB in Python?

How to insert bulk data into Cosmos DB in Python? Question: I’m developing an application in Python which uses Azure Cosmos DB as the main database. At some point in the app, I need to insert bulk data (a batch of items) into Cosmos DB. So far, I’ve been using Azure Cosmos DB Python SDK …

Total answers: 1

Python Program to create Container if not exist with partition key and unique Key

Python Program to create Container if not exist with partition key and unique Key Question: I want to write python script to create container only if it not exist with partition key and unique key. Steps for Creating Alert Container 1. Create Container With Container ID: alerts 2. Add Partition Key as /user_tenant 3. Add …

Total answers: 2