Created
February 6, 2018 00:29
-
-
Save ealsur/b2d4ec7ac6a1ac0774358869be3e9aa5 to your computer and use it in GitHub Desktop.
Azure Cosmos DB + Functions Cookbook - live migration run.csx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "Microsoft.Azure.Documents.Client" | |
using System; | |
using System.Collections.Generic; | |
using Microsoft.Azure.Documents; | |
public static async Task Run(IReadOnlyList<Document> input, IAsyncCollector<Document> docsToSave) | |
{ | |
foreach(var doc in input){ | |
// work with the document, process or create a new one | |
await docsToSave.AddAsync(doc); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment