Timestream IOT data ingestion payload format

0

Hi,

My message payload from my iiot device ( Advantech ECU-1251) will not ingest correctly into my timestream database.

The payload looks like this:

{ "state": { "reported": { "FiveMins": 197, "device_id": 9654006.1, "ModStat": 0, "CJC00": 37.3, "Ch00": 37.3,
} } }

In my table the measure_name always = "state" and the measure_value::varchar has all the remaing data in it. measure_value::bigint = blank measure_value::double = blank

I think its because the ECU-1251 curly bracket structure is wrong.

I cannot change the ouput on the ECU-1251.

From the docs I know it should look like this:

{ Measures "temperature": 24.62216675311284, "pressure": 31.381285890765184, "humidity": 1015.2094878981652, ”device_id": "sensor_02", "building": "Day 1", "room": "10.01" }

Is there a way to change the "rule" to parse this format correctly so it can ingest correctly into time stream?

Thanks!

Evguy

EvGuy
gefragt vor 2 Jahren288 Aufrufe
1 Antwort
0

Hi,

I suggest to use statement like this one in your IoT Rule:

select state.reported.FiveMins as FiveMins, ...

Please also consider following resources

best regards, Andrei

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen