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

1개 답변
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

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인