问题描述
我正在尝试使用Azure Data Factory将数据从SQL Server递增加载到CosmosDb Mongo API。但是我想在相同的CosmosDb Mongo API中保存水印。
I am trying to load data incrementally from SQL server to CosmosDb Mongo API using Azure Data Factory. But I want to save the watermarks in the same CosmosDb Mongo API.
https://docs.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-multiple-tables-portal
我正在关注这篇文章,但我的情况略有不同。我不想在SQL中加水印,而是想在CosmosDB中做到这一点。
I am following this article but my scenario is bit different. Instead of watermarking in SQL I want to do that in CosmosDB.
推荐答案
根据我的理解,如同SQL我们可以有1列作为水印,它可以帮助我们增加负载。你想知道如何在MongoAPI中实现相同的功能,这是一个NoSQL。
As per my understanding, as in SQL we can have 1 column as a watermark which helps us in Incremental load. You want to know how can you achieve same functionality in MongoAPI which is being a NoSQL.
如果我的理解是正确的,你可以做的是:
If my understanding is correct, what you can do is :
1。在文档的每个节点中添加1个附加属性以实现此目的。
1. Either adding 1 additional property in each node of your documents for achieving this.
2。或者您可以使用_ts即timestamp属性,默认情况下由MongoDB填充。
2. or you can use _ts i.e. timestamp property which is by default populated by MongoDB.
希望它有所帮助。如果您仍有疑虑,请告诉我们
Hope it helps. Please let us know if you still have concerns
这篇关于如何在CosmosDb Mongo API中保存水印以获得增量数据加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!