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

    • Result

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

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com