fiware-cygnus mongodb使用/存储集合名称.如何使用其他分隔符? [英] fiware-cygnus mongodb storing collection name with /. How to use other separator?

查看:88
本文介绍了fiware-cygnus mongodb使用/存储集合名称.如何使用其他分隔符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从猎户座博克发送数据时,Cygnus使用"/"创建集合名称,可以使用任何其他分隔符.例如,实体名称为room01,实体类型为room.然后,集合名称变为sth _/_ room01_room.如果可以的话,如何更改配置?因为我无法使用mongodump创建备份.

When data is sent from orion borker.Cygnus creates the collection name with "/" is it possible to use any other separator. As for example, the entity name is room01 and entity type is room. Then the collection name becomes sth_/_room01_room. If it is possible how can I change the configuration? because I cannot use mongodump to creat backup of it.

推荐答案

mongodump 已在MongoDB 4.0中解决,因此一种可行的解决方案是使用该版本.

The limitation regarding slash in collection names in mongodump is solved in MongoDB 4.0 so one possible solution is to use that version.

关于天鹅座,根据enable_encoding设置.

With regards to Cygnus, according to NGSISTHSink and NGSIMongoSink documentation, what is called there the "new encoding" seems to avoid the slash in collection names (although the name will get somehow weird). In order to enable the new encoding you have to use the enable_encoding setting in the sink configuration.

您可以探索的另一种可能性是名称映射.此功能使您可以调整数据的持久存储方式.不确定是否可以避免STH集合名称中的斜线,但是值得花时间看一下.

Another possibility you could explore are name mappings. This feature allows you to tune how the data is persisted. Not sure if it will allow you to avoid the slash in STH collection names, but it worth the time to have a look.

这篇关于fiware-cygnus mongodb使用/存储集合名称.如何使用其他分隔符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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