How to count using pydocumentdb?

I'm using pydocumentdb as sdk to access my CosmosDB(DocumentDB) database I'm trying to execute this query SELECT VALUE COUNT(1) FROM c WHERE c._type="User" And I'm getting different...

pydocumentdb 2.3 x-ms-version header issue

I am using pydocumentdb to connect to the Azure Cosmos DB emulator running locally, all was working fine using pydocumentdb version 2.2.1. Was advised by my IDE that version 2.3.0 of pydocumentdb...

Cosmos DB + pyDocumentDB + Databricks

I've got a strange behaviour with pyDocumentDB and Databricks with Cosmos DB . I'm trying to query a collection, connection goes well, but I'm having a little troubles fetching results. If I query...

Could not connect a Python client to Azure Cosmo Bd : Import pydocumentdb fails

I work on a Mac with Python 2.7 built in install I installed pip with sudo easy_install pip I installed azure with sudo pip install azure Now I wrote a simple python client for azure : import...

How to change pydocumentdb request size limit?

I'm trying to send date to azure documentdb and I have to send a huge document (100 000+ lines), however when I send it I get a Request size is too large error. I guess it should be possible to...

How to set Rest request Headers parameters in pydocumentdb

I'm using the pydocumentdb library to query document-db. I get errors when trying to execute cross-partitions queries, which are... considering I use a primary key as partition-key... every query...

cosmos db pydocumentdb empty set from valid queries

I have ~450 (and growing) JSON documents stored in Azure CosmosDB that I need to query from a python script. The query "select * from c" returns records every time, but doesn't return all of them...

pydocumentdb CosmosDb Python - How to add several entries to the same document

I try to add several entries tho the same document in Cosmo Db with Python using the library pydocumentdb I thought that was possible with the function CreateDocuments Creation of the Document...

Insert multiple rows from pyspark to cosmosdb

I am trying to insert more than one row to dataframe in pyspark. This is my code: First I import the packages: import pydocumentdb from pydocumentdb import document_client from pydocumentdb import...

How to provide correctly a tuple parameter to pyDocumentDB query

I tried in many ways to send a tuple parameter like: {"name": "@p", "value": tuple(['a','b']) } to the query, which is simple as: select * from c...

How do I create a partitioned collection in Cosmos DB with pydocumentdb?

The pydocumentdb.document_client.DocumentClient object has a CreateCollection() method, defined here. When creating a collection with this method, one needs to specify the database link (already...

Importing Python package to Azure Function takes too long time

In my Azure Function, I install and import some package such as: cv2, numpy, azure, pydocumentdb. I calculated the time it takes to import those libraries, it is about 20s. What are the reasons?...

Select random N records from each category in DocDB

I'm trying to compose a query that will bring N records from each category. lets say that documents has this structure: Id - Unique ID Category - String Type - String right now i'm using this...

Where to find Access log for mastekey access in Azure Cosmos DB

Can you please help me understand where can i find logs of all activities using the masterkey to access CosmosDB/ DocumentDB azure. Background: All i can find in the logs is userid who accessed...

Sending data to document db in python

I'm currently trying to send data to a azure document db collection on python (using pydocumentdb lib). Actually i have to send about 100 000 document on this collection and this takes a very long...

Error: upload data to Cosmosdb using pydocumendb

I'm using pydocumentdb to upload some processed data to CosmosDB as a Document on Azure Cloud with a Python script. The files are coming from the same source. The ingestion works well with some...

Possible to run Stored Procedure using documentDB SDK for Python?

I'm using Tornado and pydocumentDB to run a storage application on Azure. I also have a stored procedure: function userIDSproc() { var collection = getContext().getCollection(); // Query...

DocumentDB in Docker - "The authorization token is not valid at the current time."

I'm running a Python Tornado application in Docker, and part of the API involves connecting to DocumentDB for storage: client = document_client.DocumentClient(config.uri, {'masterKey':...

Create collection on azure cosmos db too slow

I'm trying to automatically upload a CSV document to Azure Cosmos SQL API DB with Python using pydocumentdb. I'm using pandas to perform some data preprocessing and then a transform every line in...

SSL: CERTIFICATE_VERIFY_FAILED while connecting to cosmos DB

I am getting an SSL error( SSL: CERTIFICATE_VERIFY_FAILED ) while connecting to Cosmos DB. my cosmos DB is present in local network and i am running my python script from ubuntu machine. Below is...

Select data from Azure Cosmos and output in Python Script

There is existed database, collection in my Azure Cosmos. The problem is that I am stuck in how to output the select query data from Azure. The errors are shown me 'TypeError: 'QueryIterable'...

Cannot use proxy to connect to Documentdb using python

I try to connect to my documentDB Azure through proxy but i've below error : raise ConnectionError(e, request=request) requests.exceptions.ConnectionError:...

Access azure cosmosdb emulator from ubuntu using python script

I have got azure cosmos db emulator installed and running on windows 10. I'm successful in performing operations on db using .net sdk on windows(Visual Studio) (Used windows certificate manager...

Conda does not create environment

I am working on a shared project stored in bitbucket. I am trying to import the environment that it is used there. After I git clone, I have everything that I need in my PyCharm project folder....