Azure/azure-cosmos-python

QueryDocuments list in Parameters

Closed this issue · 1 comments

The query with a single value (word) works fine. With the list (words) in Parameters it does not work. The query works in the Storage Explorer. Is there some way to provide a list of strings?

word = 'first'
words = ['first', 'second', 'third']

singlequery = c.client.QueryDocuments(c.collection_link, query={'query': "SELECT * FROM c as P WHERE P.ProductID = @word", "parameters" : [{ "name":"@word", "value": word}]})
multiquery = c.client.QueryDocuments(c.collection_link, query={'query': "SELECT * FROM c as P WHERE P.ProductID IN (@words)", "parameters" : [{ "name":"@words", "value": words}]})

singlequery = JSON list of docs
multiquery = []

Closing this issue due to age. Active development of our Python SDK has moved to https://github.com/Azure/azure-sdk-for-python. We have also released 4.0 which includes many updates and new features. If this issue still needs our attention, please reopen it in the new repository.