It does help @PramodValavala-MSFT. Since I'll occasionally have larger files to deal with the Azure Function route seems to be the best course of action.
Below are the two stored procedures I've been testing with. I've stripped away everything to the bare essentials.
To test I've been executing them directly from Data Explorer. I supply the same partition key value (numerical value of 100 in my case) when I execute both SP's. When I execute SP1 I see the first 100 documents returned have partition key values that have many values other than 100. If I execute SP2 I get 2 documents back which is correct since I only have 2 documents with a partition key value of 100.
SP1
function sample() {
__.chain()
.filter(function(doc) { return true })
.value((err, documents, responseOptions) => {
__.response.setBody(documents);
})
}
SP2
function sample2() {
const status = __.readDocuments(__.getSelfLink(), (err, documents, responseOptions) => {
__.response.setBody(documents);
});
}
Thanks for the reply back @AnuragSharma-0605
I performed some additional troubleshooting and found something interesting. If I use .queryDocuments() or .readDocuments() in my stored procedure the resulting documents I receive in the callback are scoped to the partition key I sent when I executed the stored procedure (which is exactly what I'm expecting).
However, if I use Javascript Language Integrated Query instead the resulting documents ignore the partition key I sent.
For example, if I use the following to get all the documents in the partition key I sent:
__.chain()
.filter(function(doc) { return true })
.value()
I end up seeing results from all partition key values and not just the one I sent to the stored procedure.
Shouldn't using chain and filter as I have it above bring back the same results of __.readDocuments()?
Mike
Not at this time. I'll check out the link and see if I can get the info I need out of it.
Thanks!