piby
10/13/2023, 2:53 PMMayank
piby
10/13/2023, 3:05 PMLASTWITHTIME(dataColumn, timeColumn, dataType) function
SELECT pk1, pk2, LASTWITHTIME(m1, processing_time, ‚‘INT‘) , LASTWITHTIME(m2, processing_time, ‚‘INT‘)
FROM myTable
GROUP BY pk1, pk2
where pk1 and pk2 together makes the unique composite key and m1 and m2 are metric columns
It works fine but
1) it makes the query verbose especially if there are a lot of metric columns.
2) I am not sure how the performance will be for LASTWITHTIME function as the query scale.
3) I am not sure if the metrics returned would be really really latest as the query scale. We would like to avoid inconsistent results here.
It would have been really nice to have upset functionality where we can just make a select query with composite key and get the latest values of metrics.Andres
10/13/2023, 4:36 PMpiby
10/13/2023, 6:03 PM