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.
Bulk inserting data into Cosmos DB
How to do it...
Perform the following steps:
- 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...