Skip to content

rayokota/kafka-connect-jsonata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka Connect JSONata Transform

A Kafka Connect plugin that uses a JSONata expression to transform the Kafka Connect record.

Installation

You can install or download the latest version of the plugin from Confluent Hub.

Configuration Examples

Skip tombstone records:

"transforms": "jsonata",
"transforms.jsonata.type": "io.yokota.kafka.connect.transform.jsonata.JsonataTransformation",
"transforms.jsonata.expr": "value = null ? null : $"

Drop the record key and it's schema:

"transforms": "jsonata",
"transforms.jsonata.type": "io.yokota.kafka.connect.transform.jsonata.JsonataTransformation",
"transforms.jsonata.expr": "$sift($, function($v, $k) {$k != 'keySchema' and $k != 'key'})"

For more examples, see this blog.

Configuration Reference

expr

The JSONata expression to apply to the Kafka Connect record.

timeout.ms

The maximum amount of time to wait (in ms) for the JSONata transformation to complete. Default is 5000.

max.depth

The maximum number of recursive calls allowed for the JSONata transformation. Default is 1000.

License

This codebase is licensed under the Apache License 2.0. See the LICENSE file for more details.

Releases

No releases published

Packages

No packages published

Languages