updating multiple DocumentDB documents from azure function
See original GitHub issueHi,
It looks like the current DocumentDB binding is optimized for receiving a single document as input and updating or creating a single document as output.
I’m wanting to write an azure function that is triggered via HTTP and then creates/updates multiple documents and am not sure how to get access to the DocumentDB connection.
In C#, I think I can declare a DocumentClient
parameter and then create my documents that way?
But what about in nodeJS? Is there a way to get access to the client in NodeJS? Or do I just need to connect to the DB myself from within my nodeJS function?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Azure Functions unable to update Multiple Cosmos ...
The below code gives a way to update/upsert for multiple cosmos DB documents through Azure Functions using Java script. Function code:
Read more >Partial document update - Azure Cosmos DB for NoSQL
Learn how to conditionally modify a document using the partial document update feature in Azure Cosmos DB for NoSQL.
Read more >Parallelism when using Azure Functions to update a ...
I've recently noticed that I don't get a reliable update when uploading multiple images. Maybe only 6 of the 10 will show in...
Read more >Azure Cosmos DB bindings for Functions 1.x
The Azure Cosmos DB output binding lets you write a new document to an Azure Cosmos DB database using the SQL API. Output...
Read more >Azure Cosmos DB trigger for Functions 2.x and higher
The trigger doesn't indicate whether a document was updated or inserted, it just provides the document itself. If you need to handle updates...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mathewc can you elaborate on this:
I can’t find an example in node that shows how you can bind to multiple database items from an azure function. For instance, if a client sent an array of document IDs, I’d like to bind to each of those documents so I can return each of their results.
Thanks.
Closing this since I believe your scenario is supported already. Please reopen if you find issues, thanks.