How I specify the Fiware-Service and Fiware-ServicePath fields at Orion that set the name of MySQL database and table in Cygnus? -
so far have configured contextbroker send data cygnus in turn saves data default names in database.
but if want target specific database specific table?
i know have set:
dbname=<fiware-service> tablename=<fiware-servicepath>_<entityid>_<entitytype>
i dont know file is, , know isnt in /etc/sysconfig/contextbroker because folder doesnt exist.
edit1: here updatecontext:
(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
as said table automatically created database doesnt.
fiware-service , fiware-servicepath set @ entity creation time using http headers in entity creation rest request. please have following sections in orion user manual:
update: example, in order create entity in service "serva" , service path "/path1" use example shown in the create entity section in manual adding 2 additionals http headers curl line:
(curl localhost:1026/v1/updatecontext -s -s --header 'content-type: application/json' --header 'accept: application/json' --header 'fiware-service: serva' --header 'fiware-servicepath: /path1' -d @- | python -mjson.tool) <<eof ...
that make insert information in following mysql database/table (assuming cygnus configured, subscriptions correct, etc.):
dbname=serva tablename=path1_<entityid>_<entitytype>
note default behaviour store information each entity in different table. default behaviour can changed, if interested in possibility, please create new question in stackoverflow dealing that.