.. meta:: :description: This document provides usage information for the Apache Kafka SMT org.apache.kafka.connect.transforms.HoistField. .. _hoistfield: ========== HoistField ========== The following provides usage information for the |ak-tm| SMT ``org.apache.kafka.connect.transforms.HoistField``. Description ----------- If the data has a schema, wrap data using the specified field name in a Struct; if the data does not have a schema, wrap data using the specified field name in a Map. Use the concrete transformation type designed for the record key (``org.apache.kafka.connect.transforms.HoistField$Key``) or value (``org.apache.kafka.connect.transforms.HoistField$Value``). Example ------- The configuration snippet below shows how to use ``HoistField`` to wrap the field name in a Struct. .. code-block:: json "transforms": "HoistField", "transforms.HoistField.type": "org.apache.kafka.connect.transforms.HoistField$Value", "transforms.HoistField.field": "line" Messages sent: .. sourcecode:: properties Foo Bar Topic result: .. sourcecode:: properties {"line":"Foo"} {"line":"Bar"} .. tip:: For additional examples, see `Hoist Field `__ for managed connectors. Properties ---------- .. list-table:: :header-rows: 1 :widths: 15 30 10 10 10 10 * - Name - Description - Type - Default - Valid Values - Importance * - ``field`` - Field name for the single field that will be created in the resulting Struct or Map. - string - - non-empty list - medium .. include:: includes/predicate.rst