Hi all,
We are using siddhi now, And some of our logic can't write as sql, so we use siddhi's UDF to deal with it.
I had read ksql's document but can't find UDF, so I want know does ksql have plan to support UDF.
Hi Julian,
Currently we don't have a mechanism to add custom UDFs. We need to decide about security implications of letting users to upload code in runtime. However, you can add your own UDFs by implementing the io.confluent.ksql.function.udf.Kudf interface and adding it to the list of available UDFs in io.confluent.ksql.function.KsqlFunctions. You can find examples in ksql-core under io.confluent.ksql.function package.
Hope this helps.
--Hojjat
I also like this idea... There will probably be many scenarios where this is needed or helpful.
At least a workaround is already available as described by Hojjat.
Most helpful comment
Hi Julian,
Currently we don't have a mechanism to add custom UDFs. We need to decide about security implications of letting users to upload code in runtime. However, you can add your own UDFs by implementing the
io.confluent.ksql.function.udf.Kudfinterface and adding it to the list of available UDFs inio.confluent.ksql.function.KsqlFunctions. You can find examples inksql-coreunderio.confluent.ksql.functionpackage.Hope this helps.
--Hojjat