使用C#控制台应用程序处理azure存储中的所有行 [英] Processing all rows in azure storage using C# console application

查看:81
本文介绍了使用C#控制台应用程序处理azure存储中的所有行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题定义:



1.从Azure存储中读取所有记录。

2.遍历每一行并生成另一行。

3.将新生成的行插入到同一个表中。



我在Azure表中有大约50000条记录。所以我的问题是如何在c#中批量读取数据用于例如...读取100条记录处理它们然后读取另外100条并处理它们等等?



我尝试过的事情:



还没有,还在试图弄清楚如何批量处理记录。

Problem Definition:

1. Read all the records from Azure storage.
2. Loop through each row and generate another row.
3. Insert a newly generated row into the same table.

I have around 50000 records in the Azure table. So my question is How can read data in batches for such a big operation in c# for eg... Read 100 records process them then read another 100 and process them and so on?

What I have tried:

Nothing yet, Still trying to figure out how I can do batch processing of records.

推荐答案

快速如何阅读Azure表格 - Google搜索 [ ^ ]出现以下非常有用的文章(附代码):



* 使用C#使用Azure存储表 - CodeProject [ ^ ]

* 使用.NET开始使用Azure表存储Microsoft Docs [ ^ ]

* Azure存储表设计指南| Microsoft Docs [ ^ ]

* 如何在Web应用程序中写入和读取Windows Azure表格 - Bruno Terkaly - 开发人员传播者 - bterkaly@microsoft.com [ ^ ]

*还有更多! :)



更新对于批处理操作,特洛伊亨特:在Azure桌面存储上使用1.54亿条记录 - 我是否已经被关注?的故事 [ ^ ]讨论 TableBatchOperation 方法调用。还有一篇文章称为每秒将22,500行导入Azure表存储。这听起来像你在寻找。
A quick how to read Azure table - Google Search[^] turns up the following very helpful articles (with code):

* Working with Azure Storage Tables using C# - CodeProject[^]
* Get started with Azure Table storage using .NET | Microsoft Docs[^]
* Azure Storage Table Design Guide | Microsoft Docs[^]
* How to write to and read from Windows Azure tables within Web Applications – Bruno Terkaly – Developer Evangelist – bterkaly@microsoft.com[^]
* and much much more! :)

UPDATE For "Batching" Operations, Troy Hunt: Working with 154 million records on Azure Table Storage – the story of "Have I been pwned?"[^] talks about a TableBatchOperation method call. Also a section in the article called "Importing 22,500 rows per second into Azure Table Storage". This sounds like what you are looking for.


这篇关于使用C#控制台应用程序处理azure存储中的所有行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆