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"
}
}
}
Effectively what you are asking to do here is to store Timescale data (via QuantumLeap) on to two separate tenants. For QuantumLeap 0.8.3, this was possible for NGSI-LD since QL 0.8.3 relied on the
fiware-serviceheader. You could add areceiverInfokey into each subscription to split the data into separate tenants e.g.tenant1,tenant2Now with QuantumLeap 1.0, I think that the
NGSILD-Tenantheader is now properly supported, so this "trick" won't work directly, but you could relay the information via another microservice. e.g.:All that the new-micro-service would need to do, would be to alter
NGSILD-Tenantand combine it with thefiware-serviceheader to come up with a new and unique tenant.If you combine Orion-LD with Mintaka you could just use the NGSI-LD Temporal interface directly and make separate queries for the two types of data of course - for example using this Grafana plugin