filter
Acknowledges all records that get passed to the filter.
Description
Acknowledges all records that get passed to the filter, so
the records will be filtered out if the condition provided to the processor is
evaluated to true
.
Important: Make sure to add a condition to this processor, otherwise all records will be filtered out.
Configuration parameters
- YAML
- Table
version: 2.2
pipelines:
- id: example
status: running
connectors:
# define source and destination ...
processors:
- id: example
plugin: "filter"
settings:
# Whether to decode the record key using its corresponding schema from
# the schema registry.
# Type: bool
sdk.schema.decode.key.enabled: "false"
# Whether to decode the record payload using its corresponding schema
# from the schema registry.
# Type: bool
sdk.schema.decode.payload.enabled: "false"
# Whether to encode the record key using its corresponding schema from
# the schema registry.
# Type: bool
sdk.schema.encode.key.enabled: "false"
# Whether to encode the record payload using its corresponding schema
# from the schema registry.
# Type: bool
sdk.schema.encode.payload.enabled: "false"
Name | Type | Default | Description |
---|---|---|---|
sdk.schema.decode.key.enabled | bool | false | Whether to decode the record key using its corresponding schema from the schema registry. |
sdk.schema.decode.payload.enabled | bool | false | Whether to decode the record payload using its corresponding schema from the schema registry. |
sdk.schema.encode.key.enabled | bool | false | Whether to encode the record key using its corresponding schema from the schema registry. |
sdk.schema.encode.payload.enabled | bool | false | Whether to encode the record payload using its corresponding schema from the schema registry. |
Examples
Filter out the record
Configuration parameters
- YAML
- Table
version: 2.2
pipelines:
- id: example
status: running
connectors:
# define source and destination ...
processors:
- id: example
plugin: "filter"
No configuration parameters.
Record difference
Before | After | ||||
1 | - | { | |||
2 | - | "position": null, | |||
3 | - | "operation": "create", | |||
4 | - | "metadata": { | |||
5 | - | "key1": "val1" | |||
6 | - | }, | |||
7 | - | "key": null, | |||
8 | - | "payload": { | |||
9 | - | "before": { | |||
10 | - | "bar": "baz" | |||
11 | - | }, | |||
12 | - | "after": { | |||
13 | - | "foo": "bar" | |||
14 | - | } | |||
15 | - | } | |||
16 | - | } |