<a id="tombstonehandler"></a>

# Kafka Connect TombstoneHandler SMT Usage Reference for Confluent Cloud

The following provides usage information for the Confluent Single Message Transformation (SMT)
`io.confluent.connect.transforms.TombstoneHandler`.

## Description

Manage tombstone records. A tombstone record is defined as a record with the
entire value field being null, whether or not it has ValueSchema.

## Installation

This transformation is developed by Confluent and does not ship by default with
Kafka or Confluent Cloud. You can install this transformation using the
[confluent connect plugin
install](https://docs.confluent.io/confluent-cli/current/command-reference/connect/plugin/confluent_connect_plugin_install.html)
command:

```properties
confluent connect plugin install confluentinc/connect-transforms:latest
```

## Examples

The configuration snippets below show how to use and configure the `Tombstone`
SMT.

The connector uses the default (warn) behavior to handle tombstone records,
which ignores the tombstone silently and writes a WARN message to log.

```json
"transforms": "tombstoneHandlerExample",
"transforms.tombstoneHandlerExample.type": "io.confluent.connect.transforms.TombstoneHandler"
```

The connector uses the ignore behavior to handle tombstone records, which
ignores the tombstone silently and writes a DEBUG message to log.

```json
"transforms.tombstoneHandlerExample.type": "io.confluent.connect.transforms.TombstoneHandler",
"transforms.tombstoneHandlerExample.behavior": "ignore",
```

The connector uses the fail behavior to handle tombstone records, which fails
the execution, throws a `DataException`, and writes a DEBUG message to log.

```json
"transforms.tombstoneHandlerExample.type": "io.confluent.connect.transforms.TombstoneHandler",
"transforms.tombstoneHandlerExample.behavior": "fail"
```

## Properties

| Name       | Description                                                                                                                                                                                                                                                                                                                       | Type   | Default   | Valid Values         | Importance   |
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|-----------|----------------------|--------------|
| `behavior` | If set to `ignore`, the tombstone<br/>record is ignored silently, with a DEBUG message written to log.<br/>If set to `warn`, the tombstone record is ignored silently,<br/>with a WARN message written to log. If set to `fail`, the execution<br/>fails, a `DataException` is thrown, and a DEBUG message is<br/>written to log. | string | warn      | [ignore, warn, fail] | medium       |

## Predicates

Transformations can be configured with *predicates* so that the transformation
is applied only to records which satisfy a condition. You can use predicates in
a transformation chain and, when combined with the [Kafka Connect Filter (Kafka) SMT Usage Reference for Confluent Cloud](filter-ak.md#ak-filter), predicates
can conditionally filter out specific records. For details and examples, see [Predicates](filter-ak.md#predicates).
