-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
False
-
Many of the SMT examples in the documentation mostly illustrate usage in a vacuum and this often leads to questions about scripting failures since the event stream isn't always confined to just those types, i.e. schema history, transaction metadata, etc.
Lets take an example here. The documentation shows:
transforms=filter transforms.filter.type=io.debezium.transforms.Filter transforms.filter.language=jsr223.groovy transforms.filter.condition=value.op == 'u' && value.before.id == 2
But what about situations where the emitted event has no value field or the value has no op field in the case of tombstones or schema change events respectively.
We should explore improving these types of examples by either making a reference to a common section that discusses SMT filtering and that such configuration will be necessary so that the condition doesn't filter on unexpected event types OR the documentation should illustrate the configuration in a more practical approach, describing why the predicate is required in conjunction with the filter SMT.