JSON Adaptor

The JSON Adaptor takes multiple messages structured as an array of objects and converts each object to a relational row.

The adaptor configuration must specify the following arguments:

No. Argument Description
1 Table columns Comma separated list of column names in the target table. Each name must correspond to a known column in the target table
2 Object keys Comma separated list of JSON object keys. Each key identifies a value that maps to the corresponding column above. If the key does not exist, the column will receive a null value.
3 Message state key Object key of the message state field. This key must exist in every message.
4 Message state type Data type of the message state. Use N or T to indicate number or timestamp data type.
5 Message state mask Format mask that the message state appears in

Note that each argument must be enclosed in single quotes.

The number of object keys (argument no. 2) must match the number of table columns (argument no. 1).

An example of a JSON adaptor configuration is:

'device_id,datetime,temperature','id,timestamp,temperature','timestamp','T','YYYYMMDDHH24MISS.MS'

See format masks for message state format mask notation 

Have more questions? Submit a request

Comments

Article is closed for comments.

Powered by Zendesk