betelgeuse
betelgeuse

Reputation: 469

Send multi-measure record from AWS IOT Core rule to Amazon Timestream

I have an IOT Device sending temperature, humidity and pressure to AWS IOT Core and, with a rule, send it to an Amazon Timestream DB, using the following SQL statement in the IOT Core rule:

SELECT temperature, humidity, pressure FROM 'devicepub/data/#'

At the moment, I have one record per measure.

However I want to use the new feature of Timeseries, which allows multi-measure records and, therefore, obtain one record per timestamp, which includes all the variables measured.

How should I write the IOT Core rule?

Is it actually possible to do that now?

Upvotes: 2

Views: 796

Answers (2)

Mahesh Lalge
Mahesh Lalge

Reputation: 11

I tried packing all the required fields and it saved the complete JSON payload as varchar.

Example:

{
  "data" : {
              "temperature" : 25,
              "humidity: : 30
           }
}

Upvotes: 1

If I'm not terribly mistaken, I'm afraid you can't do that yet. Since multi-measure records are fairly new, the timestream action on IoT Core rules doesn't support it yet. The way I see it, you have these options

  • Use a lambda to insert multi-measure records into timestream
  • Add the measures in the dimension (cheeky, I know)

Upvotes: 2

Related Questions