AWS IoT SQL Testing

0

Hello,

I have an MQTT device that is currently sending the following JSON message:

{ "message": { "coretemp": [ [ "Package id 0", 41.0, 80.0, 100.0 ], [ "Core 0", 36.0, 80.0, 100.0 ], [ "Core 1", 37.0, 80.0, 100.0 ], [ "Core 2", 38.0, 80.0, 100.0 ], [ "Core 3", 38.0, 80.0, 100.0 ] ] } }

Now, I'm trying to build an "AWS IoT SQL" query to store certain things in Timestream. I'm looking for a test environment to play around with the query language a little bit.

Is there a tool where I can paste the JSON and just write a few queries?

Thanks

asked a year ago375 views
1 Answer
2
Accepted Answer

Hi there!

When you build an IoT SQL Query, you'd be using IoT Rules Engine to perform the query and 'filter' the messages coming in to your topic to be sent to another location.

To make things easy, what you can do to test is to create a "republish" rule in IoT Rules (https://docs.aws.amazon.com/iot/latest/developerguide/iot-repub-rule.html). This will allow you to see exactly the results of the Rule when you use the IoT MQTT Client (https://docs.aws.amazon.com/iot/latest/developerguide/view-mqtt-messages.html) where you'll subscribe to the republish topic.

I hope this helps! Let us know if you've more questions.

T

profile pictureAWS
Thiru A
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions