我是使用 azure 存储表的新手。我试图批量插入我的实体,但我发现您无法执行具有不同分区键的批量操作。
有什么方法可以让我想在表格中插入大约 10,000 - 20,000 个文件详细信息。
这是我迄今为止尝试过的:
public class Manifest:TableEntity
{
private string name;
private string extension;
private string filePath;
private string relativePath;
private string mD5HashCode;
private string lastModifiedDate;
public void AssignRowKey()
{
this.RowKey = relativePath.ToString();
}
public void AssignPartitionKey()
{
this.PartitionKey = mD5HashCode;
}
public string Name { get { return name; } set { name = value; } }
public string Extension { get { return extension; } set { extension = value; } }
public …Run Code Online (Sandbox Code Playgroud) 我对正则表达式非常陌生,我需要从之间包含的字符串中获取特定值 ' '
使用正则表达式能够获取值,但是'在两者之间有三分之一时会获得异常 ' '。
可变规则包含整个字符串
IEnumerable<string> possibleValues = Regex
.Matches(rule, @"'(?<val>.*?)'")
.Cast<System.Text.RegularExpressions.Match>()
.Select(match => match.Groups["val"].Value)
.ToArray();
Run Code Online (Sandbox Code Playgroud)
传递以下字符串时
规则:“街道地址”
必须为“班德拉(西)班德圣安德鲁路4楼萨米尔综合楼”(默认值)
期望的值是班德拉(西)圣安德鲁路4楼的Street Address和 Samir Complex。
但是在圣安德鲁4楼获得街道地址和 Samir Complex