Tag: azure cosmosdb

如何从Excel中导入documentDB中的批量数据?

我已经浏览了一天,关于如何从excel文件插入到documentDB中的批量数据,但我没有得到任何信息。 我可以从excel文件读取数据,并逐个插入到documentDB中 Service service = new Service(); foreach(data in exceldata) //exceldata contains set of rows { var student = new Student(); student.id= ""; student.name = data.name; student.age = data.age; student.class = data.class; student.id = service.savetoDocumentDB(collectionLink,student); //collectionlink is a string stored in web.config students.add(student); } Class Service { public async Task<string> AddDocument(string collectionLink, Student data) { […]

如何从包含5000条logging的Excel文件插入到documentDB中?

我有一个Excel文件,最初有大约200行,我能够将Excel文件转换为数据表,一切正确插入到documentdb中。 Excel文件现在有5000行,在插入30-40条logging后没有插入,其余所有行都没有插入到documentdb中 我发现一些例外如下。 Microsoft.Azure.Documents.DocumentClientException:exception:Microsoft.Azure.Documents.RequestRateTooLargeException,消息:{“错误”:[“Request rate is large”]} 我的代码是: Service service = new Service(); foreach(data in exceldata) //exceldata contains set of rows { var student = new Student(); student.id= ""; student.name = data.name; student.age = data.age; student.class = data.class; student.id = service.savetoDocumentDB(collectionLink,student); //collectionlink is a string stored in web.config students.add(student); } Class Service { public async […]