Groovy Evaluator
Supported pipeline types:
|
You can develop the following scripts for the processor:
- Initialization script - Optional initialization script that sets up any required resources or connections. The initialization script is run once when the pipeline starts.
- Main processing script - Main script that processes data. The main script is run for each record or each batch of data, based on the configured processing mode.
- Destroy script - Optional destroy script that closes any resources or connections that were opened by the processor. The destroy script is run once when the pipeline stops.
When you use a Groovy Evaluator processor in a pipeline, Data Collector passes a batch of data to the processor and converts the data to a scripting-friendly data structure for processing.
You can call external Java code from the script. You can also configure the processor to use invokedynamic bytecode instruction.
The processor provides extensive sample code that you can use to develop your script.
When configuring the processor, you specify the processing mode, enter the scripts, and specify the method to access records and any script parameters used in the script.