liveBook · Manning

Transformation interface

As explained in Kafka Streams in Action, Second Edition

The Kafka Connect Transformation interface defines the contract for components that modify records as they pass through a connector.

The Kafka Connect Transformation interface defines how a component modifies records as they pass through a connector. A custom transformation is useful when built-in transformations cannot reduce a record to the required fields. section 5.6.3

Implementations typically handle these responsibilities:

  • Support transformation of either the record key or value through Key and Value inner classes. section 5.6.3

Extracting stock metrics

A stock API record contains more than 70 metrics, but a connector needs only five or six. Configure a comma-separated field list, then filter either its map value or structured value and return a new record. section 5.6.3

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Explains apply branching and both record representations, while omitting broader interface method details.
Examples
Uses a stock API record, configured field names, map filtering, and schema-aware Struct reconstruction.
What it assumes
Assumes familiarity with Kafka Connect records and connector configuration, while distinguishing schema-aware and schemaless processing.
What you can do after
Build it from scratch as a custom transformation that filters configured fields in schema-aware or schemaless records.
How it connects
Connects Kafka Connect transformations with connectors, schemas, schemaless records, record keys, and record values.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.