Drop fields

The drop-fields transform function drops fields of structured data (Currently only AVRO is supported).
The cast transform function transforms the data to a target compatible schema.

The step name is drop-field, and the UserConfig is controlled here: {"steps": [{"type": "drop-fields", "fields": "password,other"}]}.

Parameters:

Parameter Description

fields

A comma-separated list of fields to drop.

part

when used with KeyValue data, defines if the transform function is done on the key or on the value. If null or absent the transform function applies to both the key and the value.

Example

  1. Produce an AVRO message with the payload: {name: value1, password: value2}.

    • AVRO

    • Result

    {"name": "value1", "password": "value2"}
    {"name": "value1"}
  2. The function drops the fields specified in the fields parameter, and outputs {"{name: value1}"} 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