Jam*_*ath 11 azure azure-storage azure-table-storage
尝试在azure表存储中插入记录时,获取异常"属性值大于表服务允许的值".
Follwing是我的表结构,字符串PartitionKey,String RowKey,字符串Id,字符串站点,字符串名称,byte []内容,
public DateTime createdtime
我试图在内容字段中保存83755字节数组(82KB),其他字段最多35个字符.
谁能告诉我天蓝色存储表的最大行数是多少?
以下是我提到的网址..其中提到的行最多可以有1MB.但我的不超过100 KB.
谢谢,
纳思
我建议查看Lokad.Cloud for Azure框架(开源).有一个经过生产测试的代码,用于将大型实体序列化到表存储中,限制为960KB(属性拆分和管理由框架处理)
以下是FatEntities wiki的示例用法
// TODO: change your connection string here
var providers = Standalone.CreateProviders(
"DefaultEndpointsProtocol=https;AccountName=;AccountKey=");
// 'books' is the name of the table
var books = new CloudTable<Book>(providers.TableStorage, "books");
var potterBook = new Book
{ Author = "J. K. Rowling", Title = "Harry Potter" };
var poemsBook = new Book
{ Author = "John Keats", Title = "Complete Poems" };
// inserting (or updating record in Table Storage)
books.Upsert(new[]
{
new CloudEntity<Book> {
PartitionKey = "UK", RowRey = "potter", Value = potterBook},
new CloudEntity<Book> {
PartitionKey = "UK", RowRey = "poems", Value = poemsBook}
});
// reading from table
foreach(var entity in books.Get())
{
Console.WriteLine("{0} by {1} in partition '{2}' and rowkey '{3}'",
entity.Value.Title, entity.Value.Author,
entity.PartitionKey, entity.RowRey);
}
Console.WriteLine("Press enter to exit.");
Console.ReadLine();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4771 次 |
| 最近记录: |