Package io.debezium.transforms
Class ScriptingTransformation<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
java.lang.Object
io.debezium.transforms.ScriptingTransformation<R>
- Type Parameters:
R- the subtype ofConnectRecordon which this transformation will operate
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.kafka.common.Configurable,org.apache.kafka.connect.transforms.Transformation<R>
- Direct Known Subclasses:
ContentBasedRouter,Filter
@Incubating
public abstract class ScriptingTransformation<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
extends Object
implements org.apache.kafka.connect.transforms.Transformation<R>
This is a base class for any SMT using scripting languages.
Current implementation supports only JSR223 scripting languages.
The SMT will instantiate an scripting engine encapsulated in
Engine interface in configure phase.
It will try to pre-parse the expression if it is allowed by the engine and than the expression is evaluated
for every record incoming.The engine will extract key, value and its schemas and will inject them as variables into the engine. The mapping is unique for each expression language.
- Author:
- Jiri Pechanec
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOGGER
private final org.slf4j.Logger LOGGER -
JAVAX_SCRIPT_ENGINE_PREFIX
- See Also:
-
GRAAL_JS_ENGINE
- See Also:
-
TOPIC_REGEX
-
LANGUAGE
-
NULL_HANDLING
-
engine
-
nullHandling
-
topicPattern
-
-
Constructor Details
-
ScriptingTransformation
public ScriptingTransformation()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable
-
apply
-
doApply
-
expressionField
-
config
public org.apache.kafka.common.config.ConfigDef config() -
close
public void close()
-