我的记录是分区键所在的错误数据造成的null,我需要清理它们,但到目前为止我还没有成功。
这是我尝试过的:
var scriptResult = await _dbClient.ExecuteStoredProcedureAsync<dynamic>(
GetStoredProcLink("BulkDelete"),
new RequestOptions() { PartitionKey = new PartitionKey(""), EnableScriptLogging = true },
"select * from c where c.documentDbType = "SomeValue"");
Run Code Online (Sandbox Code Playgroud)
我也尝试过用作 的Undefined.Value参数new PartitionKey()。
我从这里撕下了存储过程,但尚未更改任何内容。
注意:如果不明显的话,这是一个分区集合(由/companyId)
Null、未定义和空字符串在 Cosmos DB 中都是不同的值。你需要类似的东西:new RequestOptions { PartitionKey = new PartitionKey(null) }
| 归档时间: |
|
| 查看次数: |
3843 次 |
| 最近记录: |