Skip to content

Saving data as Double instead of bigint

0

I tested my sent data on IoT Core and the values are shown double correctly. Why the values are saved in my table as a bigint (measure_value::bigint) in Db Timestream?

IoT Core Enter image description here

Table in Db Timestream Enter image description here

Enter image description here

Rule setting: Enter image description here

asked 2 years ago302 views

2 Answers
1
Accepted Answer

Hi. It's likely that the first value of PH was exactly 8, resulting in the type being interpreted as an int. You need to handle this as covered in the developer guide here: https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html

Enter image description here

AWS
EXPERT

answered 2 years ago

0

On a different note, looks you are getting multiple measures in same event, it is recommended to use Multi-measure records in those case as it is performant, cost effective way of storing, and flexible for querying multiple metrics. https://docs.aws.amazon.com/timestream/latest/developerguide/data-modeling.html#data-modeling-multiVsinglerecords. However, IoT Core doesn't support Multi-measure as of now, you can try choosing lambda as target and and use Timestream write API (via SDKs) for ingesting data in Multi-measure format. https://docs.aws.amazon.com/lambda/latest/dg/services-iot.html https://docs.aws.amazon.com/timestream/latest/developerguide/getting-started-sdks.html

AWS

answered 2 years ago

  • Thanks. It would be an alternative but not serverless.

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.