1 Answer
- Newest
- Most votes
- Most comments
1
Hi. You should use the time_to_epoch()
function in the Timestamp value of the Rule Action. In your case:
${time_to_epoch(timestamp,"yyyy-MM-dd'T'HH:mm:ss'Z'")}
Please see the discussion of time_to_epoch()
here: https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html
I don't want ts to also end up as a metric, and I'm not sure how to prevent that.
Please change your rule query statement to:
SELECT fields.rms0 as rms0, fields.rms1 as rms1 FROM 'foo/bar'
Relevant content
- asked a year ago
- Accepted Answerasked a month ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 9 months ago
So you are saying it will pull the attribute named 'timestamp' out of my JSON even though it's not part of the SELECT?
I am indeed saying that. And I tested it before saying that. :-)
Thank you very much. It works great!!!
Thankyou for posting this, but what do I put as the Timestamp unit ?
time_to_epoch() returns the epoch time in milliseconds.