我们可以将数据添加到具有相同分区键和相同行键的 table 存储中吗
can we add data into table storage which has same partition key and same row key
基本上,我需要使用批量插入将列表保存到 table 存储中,供客户端 class 使用。
class period {
public DateTime Start { get; set; }
public DateTime End { get; set; }
}
我们该怎么做?
- 我为每个周期分配了相同的分区键和行键(客户端 ID),这是正确的方法吗(查询执行但我看不到 table 中的数据)?
- 我应该为每个对象创建不同的行键吗?
- 我们可以将 JSON
字符串存储到 table 存储中吗?
PartitionKey: The PartitionKey property stores string values that identify the partition that an entity belongs to. Partitions, as we discuss later, are integral to the scalability of the table. Entities that have the same PartitionKey value are stored in the same partition.
RowKey: The RowKey property stores string values that uniquely identify entities within each partition. The PartitionKey and the RowKey together form the primary key for the entity.
所以我不建议您为每个周期分配相同的分区键和行键。您可以使用相同的分区键和不同的行键来唯一标识实体。
以下 table 显示 Table 服务的 supported property types:
您可以在其中添加一个 json 作为字符串。
基本上,我需要使用批量插入将列表保存到 table 存储中,供客户端 class 使用。
class period {
public DateTime Start { get; set; }
public DateTime End { get; set; }
}
我们该怎么做?
- 我为每个周期分配了相同的分区键和行键(客户端 ID),这是正确的方法吗(查询执行但我看不到 table 中的数据)?
- 我应该为每个对象创建不同的行键吗?
- 我们可以将 JSON
字符串存储到 table 存储中吗?
PartitionKey: The PartitionKey property stores string values that identify the partition that an entity belongs to. Partitions, as we discuss later, are integral to the scalability of the table. Entities that have the same PartitionKey value are stored in the same partition.
RowKey: The RowKey property stores string values that uniquely identify entities within each partition. The PartitionKey and the RowKey together form the primary key for the entity.
所以我不建议您为每个周期分配相同的分区键和行键。您可以使用相同的分区键和不同的行键来唯一标识实体。
以下 table 显示 Table 服务的 supported property types:
您可以在其中添加一个 json 作为字符串。