Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1.15 KB

unwrap-key-value.adoc

File metadata and controls

50 lines (40 loc) · 1.15 KB

Unwrap KeyValue

If the record value is a KeyValue, the unwrap-key-value transform function extracts the KeyValue’s key or value and makes it the record value.
The step name is unwrap-key-value, and the UserConfig is controlled here: {"steps": [{"type": "unwrap-key-value"}]}.

Parameters:

Parameter Description

unwrapKey

By default, the KeyValue’s value is unwrapped. Set this parameter to true to unwrap the key instead.

Example

  1. Produce an AVRO message with the payload: {key={keyField: key}, value={valueField: value}}.

    AVRO
    {key={keyField: key}, value={valueField: value}}
    Result
    {"valueField": "value"}
  2. The function extracts the KeyValue’s key and outputs {valueField: value} to the output topic.

What’s next?

For more, see index.adoc or the Pulsar documentation.