【发布时间】:2015-04-23 07:12:39
【问题描述】:
到目前为止,我已将 ContextBroker 配置为向 Cygnus 发送数据,而 Cygnus 又以默认名称将数据保存在数据库中。
但是如果我想使用特定表来定位特定数据库怎么办?
我知道我必须设置:
dbName=<fiware-service>
tableName=<fiware-servicePath>_<entityId>_<entityType>
我不知道那个文件在哪里,我知道它不在 /etc/sysconfig/contextBroker 因为那个文件夹不存在。
EDIT1:这是我的更新上下文:
(curl localhost:1026/NGSI10/updateContext -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Fiware-Service: FiwareDatabase' --header 'Fiware-ServicePath: /AllSensors' -d @- ) <<EOF
{
"contextElements": [
{
"type": "Television",
"isPattern": "false",
"id": "TV2",
"attributes": [
{
"name": "channel",
"type": "integer",
"value": "14"
},
{
"name": "volume",
"type": "float",
"value": "9"
}
]
}
],
"updateAction": "APPEND"
}
EOF
正如我所说,表会自动创建,但数据库不会。
【问题讨论】:
-
没有可以设置 dbName 和 tableName 的地方,因为这些是 Cygnus 根据
fiware-service、fiware-servicePath、entityId和entityType通知值自动推断的值。因此,您需要知道如何在 Orion 上设置这些值,特别是fiware-service和fiware-servicePath(fgalan 将为您提供有关这方面的确切细节)。
标签: fiware fiware-orion fiware-cygnus