拥有Cosmos DB容器的100%副本的最简单方法 [英] Easiest way to have a 100% copy of a Cosmos DB container

查看:30
本文介绍了拥有Cosmos DB容器的100%副本的最简单方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望Cosmos DB数据库中的两个不同的容器始终始终包含完全相同的数据.唯一的区别是容器的分区键.

I want two different containers in my Cosmos DB database to contain the exact same data all the time. The only difference will be the partition key of the container.

最简单的方法是什么?我正在寻找一种几乎没有代码的方法,因此我不喜欢互联网似乎推荐的Data Factory解决方案.也许Azure中存在另一项服务或第三方服务-也许可以通过简单的触发器可靠地完成它?

What is the easiest way to accomplish this? I am looking for a method with none to little code so I do not like the Data Factory solution that the internet seems to recommend. Perhaps there is another service in Azure or a third party service - or maybe it can be done robustly with simple triggers?

澄清-我需要不断对其进行更新.一个容器是在正常使用期间所有数据都会更改的地方,另一个容器应在发生这种情况时保持同步.

Clarification - I need them to be continuously updated. One container is where all the data is changed during normal use and the other container should be kept synchronized as it happens.

推荐答案

如果您不想编写自己的代码来执行此操作,则可以使用具有

If you don't want to write your own code to do this you can use this repo which has the Cosmos DB Live Data Migrator.

这可以通过Azure部署按钮进行部署.部署后,您可以打开网站并输入所有必需的信息.然后单击另一个按钮,它将使两个容器与不同的分区键保持同步.

This can be deployed via Azure deploy button. Once deployed you can open the website and enter all of the required information. Then click another button and it will keep the two containers in sync with different partition keys.

这篇关于拥有Cosmos DB容器的100%副本的最简单方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆