Skip to content

v0.0.11

Choose a tag to compare

@github-actions github-actions released this 01 Nov 12:57
· 1 commit to master since this release

Adds EmptyStringToNullTransform for selected top-level fields in record keys and values, supporting both schemaless maps and schema-based Structs.

  • Required fields setting selects the fields whose empty strings become null.
  • Optional trim=true removes leading and trailing whitespace before conversion; defaults to false. Whitespace-only strings become null, and internal whitespace is preserved.
  • Selected string schemas become optional and have defaults removed so defaults cannot replace the resulting nulls.
  • Null records, unselected fields and non-string values are preserved.
{
  "transforms": "emptyToNull",
  "transforms.emptyToNull.type": "org.phpinnacle.toblerone.EmptyStringToNullTransform$Value",
  "transforms.emptyToNull.fields": "name,description",
  "transforms.emptyToNull.trim": true
}

Use $Key to transform record keys. For Debezium row fields, place this transform after ExtractNewRecordState.

Validation: full Gradle build, unit tests, Detekt and Kafka Connect plugin packaging tests.

Download phpinnacle-toblerone.jar and install it in the Kafka Connect plugin directory.