0

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 I do.

The error message mentions the parameter x-ms-documentdb-query-enablecrosspartition. Which is indeed a rest http header constant, but I don't find any way to add parameters to the headers neither in the document_client module.

1 Answer 1

1

Finally found it :

client_documentDB = document_client.DocumentClient(
    config['ENDPOINT'], 
    {
        'masterKey': config['MASTERKEY']
    }
)
client_documentDB.default_headers['x-ms-documentdb-query-enablecrosspartition'] = True
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.