• Glossary
  • Support
  • Downloads
  • DataStax Home
Get Live Help
Expand All
Collapse All

DataStax Streaming Home

Streaming Learning

    • Pulsar IO
      • Sinks
        • Astra DB
        • Elasticsearch
        • JDBC PostgreSQL
        • JDBC MariaDB
        • JDBC Clickhouse
        • JDBC SQLite
        • Kafka
        • Kinesis
        • Snowflake
      • Sources
        • Data Generator
        • Debezium MongoDB
        • Debezium MySQL
        • Debezium Oracle
        • Debezium PostgreSQL
        • Debezium SQL Server
        • Kafka
        • Kinesis
    • Transform functions
      • Cast
      • Compute
      • Deploy transform function in sink
      • Drop fields
      • Drop
      • Flatten
      • Merge KeyValue
      • Unwrap KeyValue
    • Real-time Processing
      • Real-time data pipelines with DataStax Astra and Decodable
    • Pulsar extensions
      • Starlight for Kafka
      • Starlight for RabbitMQ
      • Starlight for JMS
  • Streaming Learning
  • Transform functions
  • Unwrap KeyValue
Edit this Page

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.

What’s next?

For more, see Transform Functions or the Pulsar documentation.

Merge KeyValue Real-time Processing

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

© DataStax | Privacy policy | Terms of use

DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.

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.

landing_page landingpage