is there any documentation on the LASTWITHTIME agg...
# general
t
is there any documentation on the LASTWITHTIME aggregation function? I'm trying to use it right now but it seems that it only supports time columns that are LONG/INT?
m
yes, it only supports timestamps/epochs at the moment. I'll add some documentation on it, thanks for the reminder!
🙏 2
t
thanks!
j
Is it possible (query side) to convert the date string to epoch and use that in
lastwithtime
? I've tried that
Copy code
SELECT
	FromDateTime(dateString, 'YYYY-MM-dd') AS epochMillis,
	lastwithtime(value, epochMillis, 'float'),
	kpiId
FROM test_kpis
GROUP BY kpiId
Doesn't seem to work
Schema, result
Data sample
j
creating a derived column using a transform function during ingestion should work
Copy code
"transformConfigs": [
    {
        "columnName": "epochMillis",
        "transformFunction": "fromDateTime(dateString, 'YYYY-MM-dd')"
    }
]
👌 1
j
That's what I thought of but was wondering if there was some way to do it query time, seems like not then Thanks for the answer @User !