Kafka Connect GzipDecompress SMT Usage Reference for Confluent Cloud

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 Cloud. 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

Transformations can be configured with predicates so that the transformation is applied only to records which satisfy a condition. You can use predicates in a transformation chain and, when combined with the Kafka Connect Filter (Kafka) SMT Usage Reference for Confluent Cloud, predicates can conditionally filter out specific records. For details and examples, see Predicates.