Example #1
0
        public void GetDocumentBatch()
        {
            const string hashResult = "4FD33DCDE4707D09696A";
            var          result     = CosmosHelper.DocumentBatch("device", 100, 1);
            var          test       = "";

            //Assert.AreEqual(hashResult, hash);
        }
Example #2
0
        public static async Task <bool> Import([ActivityTrigger] int batch, ILogger log)
        {
            log.LogInformation($"Prepare documents for batch {batch}");
            string partitionKey = Environment.GetEnvironmentVariable("PartitionKey");
            int    docsPerBatch;

            int.TryParse(Environment.GetEnvironmentVariable("DocsPerBatch"), out docsPerBatch);
            List <string> documentsToImportInBatch = CosmosHelper.DocumentBatch(partitionKey, docsPerBatch, batch);
            await BulkImport.BulkImportDocuments(documentsToImportInBatch);

            return(true);
        }