fiware-cygnus mongodb storing collection name with /. How to use other separator?

眉间皱痕 提交于 2019-12-11 10:57:36

问题


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.


回答1:


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

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.

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.



来源:https://stackoverflow.com/questions/58622794/fiware-cygnus-mongodb-storing-collection-name-with-how-to-use-other-separator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!