简体   繁体   English

Azure Cosmos DB从日期范围读取更改提要

[英]Azure Cosmos DB read change feed from date range

Is it possible to query all historical change feed data from a specific datetime range? 是否可以查询特定日期时间范围内的所有历史更改提要数据?

So far I've found ReadDocumentFeedAsync which accepts a FeedOptions object, but that object only allows for querying based on partition key ranges. 到目前为止,我发现ReadDocumentFeedAsync可以接受FeedOptions对象,但是该对象仅允许基于分区键范围进行查询。

My main objective is knowing how to handle failures of my synchronization process. 我的主要目标是知道如何处理同步过程的失败。 Ideally I'd be able to set a date/time range to read from the change feed to synchronize any changes that occurred within that time. 理想情况下,我可以设置一个日期/时间范围,以从更改提要中读取内容,以同步该时间段内发生的所有更改。

Edit: Reading from http://news.dataloco.com/working-with-the-change-feed-support-in-azure-documentdb-microsoft-docs , it appears you can set an "etag" to start from... though I can't find support for it through C# classes and I have no idea if those API's still match that article. 编辑:从http://news.dataloco.com/working-with-the-change-feed-support-in-azure-documentdb-microsoft-docs阅读,您似乎可以将“ etag”设置为开始。虽然我无法通过C#类找到对此的支持,但我不知道这些API是否仍与该文章匹配。

I am afraid, there is no way to setup a range. 恐怕无法设置范围。 There is only StartTime property on the FeedOption. FeedOption上只有StartTime属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM