Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Azure Serverless Computing Cookbook

You're reading from   Azure Serverless Computing Cookbook Build and monitor Azure applications hosted on serverless architecture using Azure Functions

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781789615265
Length 424 pages
Edition 2nd Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Jason Marston Jason Marston
Author Profile Icon Jason Marston
Jason Marston
Praveen Kumar Sreeram Praveen Kumar Sreeram
Author Profile Icon Praveen Kumar Sreeram
Praveen Kumar Sreeram
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Developing Cloud Applications Using Function Triggers and Bindings FREE CHAPTER 2. Working with Notifications Using the SendGrid and Twilio Services 3. Seamless Integration of Azure Functions with Azure Services 4. Understanding the Integrated Developer Experience of Visual Studio Tools 5. Exploring Testing Tools for the Validation of Azure Functions 6. Monitoring and Troubleshooting Azure Serverless Services 7. Developing Reliable Serverless Applications Using Durable Functions 8. Bulk Import of Data Using Azure Durable Functions and Cosmos DB 9. Implementing Best Practices for Azure Functions 10. Configuring of Serverless Applications in the Production Environment 11. Implementing and Deploying Continuous Integration Using Azure DevOps 12. Other Books You May Enjoy

Bulk inserting data into Cosmos DB

Now that we have scaled up the collection, it's time to insert the data into the Cosmos DB collection. In this recipe, we will learn about one of the simplest ways of inserting data into Cosmos DB to make this recipe simple and straightforward.

How to do it...

Perform the following steps:

  1. Create a new activity trigger named ImportData_AT, which takes the employee collection as input and saves the data in the collection. Paste the following code into the new activity trigger:
[FunctionName("ImportData_AT")]
public static async Task<string> ImportData_AT(
[ActivityTrigger] List<Employee> employees,
[CosmosDB(ConnectionStringSetting = "CosmosDBConnectionString...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime