查询 Azure Table 带 Rest 的存储 Api

Query Azure Table Storage with Rest Api

我正在尝试使用其余的 api.The 从天蓝色数据 table 检索数据 Url 看起来像这样。

https://<service-url>/Customers(PartitionKey='MyPartition')

出现了 Api 错误 无效数据

如果我将 RowKey 与 PartitionKey 一起添加,则类似这样。有效。

https://<service-url>/Customers(PartitionKey='MyPartition',RowKey='MyRowKey1')

是否需要传递RowKey?

如果我只想从一个分区中检索所有数据怎么办。 我知道,我们可以在查询参数中添加一个 $filter 但这不会导致性能问题吗?

请分享您的想法。

谢谢!

是的,使用此格式 https://<service-url>/Customers(xxx) 时需要同时指定 PartitionKeyRowKey

在查询中使用$filter时,根据我的测试(大约100条记录),耗时没有更多差异。而且我还尝试使用 SDK 仅通过指定 PartitionKey 进行查询,我可以看到它在后端自动使用 $filter(通过使用工具 Fiddler)。