# kafka-ksqldb-functions

Custom functions for KSQLDB. Currently only one function is implemented - `split_string`.
You can use it to split a string into a list.

## Building
Make sure you have Java SDK and Maven installed.

On MacOS you can install OpenJDK and Maven with homebrew:

`brew cask install java`

`brew install maven`

#### Build the project

`mvn clean package`

## Using a function
See: https://docs.ksqldb.io/en/latest/how-to-guides/create-a-user-defined-function/#add-the-uberjar-to-ksqldb-server
(ignore the `gradle` step)

## Updating a function 
You need to make a couple of steps if you want to update the existing function or create a new one. 
1. In your PR with the code changes, please bump up the package version in [pom.xml](https://github.com/theorchard/kafka-ksqldb-functions/blob/master/pom.xml#L9)
2. After merging the PR, a github action will be started automatically. If eveything is fine, a new package version will be published and a new release will be created. Please verify it on the [Releases](https://github.com/theorchard/kafka-ksqldb-functions/releases) page
3. The next step is to make a PR to KSQLDB [pom.xml](https://github.com/theorchard/kafka-connect/blob/master/ksqldb_server/pom.xml#L23), you also need to update the version there to match the new package version
