Kafka Connect GzipDecompress SMT Usage Reference for Confluent Platform

The following provides usage information for the Confluent SMT io.confluent.connect.transforms.GzipDecompress.

Caution

GzipDecompress is not currently available for managed connectors.

Description

Gzip-decompresses the byteArray input that was Gzip compressed. The SMT can only work with ByteArray format input.

Under the hood, the input is decompressed using java.util.zip.GZIPInputStream, and returns resultant ByteArray output.

Installation

This transformation is developed by Confluent and does not ship by default with Apache Kafka® or Confluent Platform. You can install this transformation using the confluent connect plugin install command:

confluent connect plugin install confluentinc/connect-transforms:latest

Examples

The following examples show how to configure and use GzipDecompress.

Gzip-decompress a base64 input

This configuration snippet shows how to decompress a gzip-compressed base64 input.

"transforms": "gzipDecompress",
"transforms.gzipDecompress.type": "io.confluent.connect.transforms.GzipDecompress$Value"

base64-conversion=$(echo “Hello world” | base64 ) -> SGVsbG8gd29ybGQK gzipped-conversion=$(echo “Hello world” | base64 | gzip )

Before: gzipped-conversion

After: base64-conversion

Predicates

Configure transformations with predicates to ensure they only process records satisfying a particular condition. You can also use predicates in a transformation chain along with the Kafka Connect Filter (Kafka) SMT Usage Reference for Confluent Platform to conditionally filter specific records. For more information, refer to Predicates.