From a model, store in two independent tables #746
Replies: 1 comment
-
Hello @sgonzalez-hiades :-)
Yes if you can use two different NGSI entity types to group different attributes. E.g. type: VehicleInfo
name: MyCar
license_plate: CA764ZA
... and type: VehicleData
location: 41.40338, 2.17403
speed: 50
... No if you'd like to keep all the attributes you in the same As a workaround, you could still use the same select name, license_plate from vehicle where fiware_servicepath = '/vehicle/info'
select location, speed from vehicle where fiware_servicepath = '/vehicle/data' Also in this case you'd only need one catch-all Orion subscription for the |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to store the same model in two independent tables with different attributes?
I am using NGSI-LD and Orion Context Broker v1.4.
I need to store in two independent tables that start data from the same model but have different attributes.
If I use two subscriptions it stores them in the same table.
1 Subscription:
{ "description": "Store vehicle data", "type": "Subscription", "entities": [ { "type": "Vehicle" } ], "watchedAttributes": ["alternateName", "color", "license_plate", "name"], "notification": { "attributes": ["id", "alternateName", "color", "license_plate", "name"], "format": "normalized", "endpoint": { "uri": "{{qunatumleap}}:8668/v2/notify", "accept": "application/json" } } }
2 Subscription:
{ "description": "Store dynamic data", "type": "Subscription", "entities": [ { "type": "Vehicle" } ], "watchedAttributes": ["location", "heading", "speed"], "notification": { "attributes": ["id","location", "heading", "speed"], "format": "normalized", "endpoint": { "uri": "{{quantumleap}}:8668/v2/notify", "accept": "application/json" } } }
Beta Was this translation helpful? Give feedback.
All reactions