integrating IoT topic incoming JSON array of measurments with timestream

0

Hi, I am trying to integrate IoT rule with timestream. I managed to handle a case when I have one incoming measurement per messages, but for network optimisation (or something) we receive packed measurements as JSON array (examples below). Is there a way to compose SQL code which will parse incoming array and put multiple measurements into timestream db?

Single measurement example:

{ "value": 335, "dataId": "Wroclaw1" "takenAt": "2022-02-01T11:40:46.770Z" }

my case:

[[{ "value": 35, "dataId": "Wroclaw1" "takenAt": "2022-02-01T11:40:46.770Z" }, { "value": 37, "dataId": "Wroclaw2" "takenAt": "2022-02-01T11:41:49.260Z" }]]

feita há 2 anos525 visualizações
1 Resposta
0

Hi kaczkaikielbasa!

I am not sure if you can use SQL to access a Timestream - as for the documentation below, you can use API or AWS SDKs to do that (chapter "Accessing Timestream").

https://docs.aws.amazon.com/timestream/latest/developerguide/what-is-timestream.html

Depending on the amount and frequency of the data, you could try testing parsing using the language of your choice from available AWS SDKs and put that on the AWS Lambda (just to try it out, later on - in production - you would probably go for the EC2 or microservices).

Please check out the code samples that are available in the documentation as well.

respondido há 2 anos
  • not the issue I was asking about. I am not accessing timestream with SQL. I want AWS IoT rule SQL to parse incoming JSON array to pass measurements to timestream. It is possible with single measurement data.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas