Hi , In my stream I have date field with VARCHAR type , want maximum value of that field , tried with max aggregate function but its returning “No Max aggregate function with STRING argument type exists” , tried using STRINGTOTIMESTAMP as well CAST function with diffrent data types but all are retruning null,
Please suggest.
Can you share a sample of your messages here, and the output of your attempts with STRINGTOTIMESTAMP
?
Hi @tchopra501 . ksqldb processes an infinite stream of data hence you need to define a window to return the max.
- covert varchar to timestamp (long): How to use a custom timestamp column - ksqlDB Documentation
- and max() it with limit 1. How to find the min/max in a stream of events using ksqlDB
HTH.
Thanks,
Rankesh
1 Like