1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
-1
To get the most recent entry from an Amazon Timestream table, you can use a query that includes an ORDER BY clause and LIMIT 1 to fetch only the top (most recent) result.
see this as an example , The following gets the 10 most recently added data points for a table. (https://docs.aws.amazon.com/timestream/latest/developerguide/sample-queries.basic-scenarios.html)
SELECT * FROM <database_name>.<table_name>
ORDER BY time DESC
LIMIT 10
Yes , you can try to extend the solution to include a query with aggregation and grouping in Amazon Timestream but may be you have to extract the results and process the results as needed.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor 8 Monaten
This approach, as I mentioned in my original post (though there was a typo, corrected now), still needs to scan the entire table to retrieve that result. Since there is an index on time, I'd expect there to be a way to query the latest row without scanning the entire table.