Skip to content

OpenTSDB mapping schema

Maxim Kolchin edited this page Mar 14, 2016 · 1 revision

SemIoT Platform uses OpenTSDB for storing sensor observations, but since OpenTSDB doesn't support RDF, a mapping RDF descriptions of the observations was created.

Mapping

  • Metric - is filled by the Device ID, e.g. 3026516628.
  • Tags:
    • property - is the URI of the ssn:observedProperty value;
    • feature_of_interest - is the URI of the ssn:featureOfInterest value, iff a triple with this predicate exists;
    • value_type - is the URI of the observation value type. qudt:Enumeration and qudt:QuantityValue are supported;
    • sensor_uri - is the URI of the ssn:observedBy value;
    • enum_value - is filled by the URI of the Enumeration value, iff value_type is equal to qudt:Enumeration.

URIs in tags

Since OpenTSDB doesn't allow to store URLs in tags, the following encoding algorithms is used:

  1. Encode the given URI,
  2. Replace all % characters with /.

The decode algorithm is the following:

  1. Replace all / characters with %,
  2. Decode the given URI.

Clone this wiki locally