result set reader

Result Set Reader Processor

Version: 17.07

Supported Since: 17.07

What is Result Set Reader Processor?

The Result Set Reader processing element can be used read values from a result set which should be passed as a scope variable to this processing element. The read value from the result set will also be set as a scope variable which has a configurable name. This is a utility processing element to facilitate row lock processing for a database table and it should be used in between "Row Lock Scope Start" and "Row Lock Scope End" processors. This processing element can be configured to read any column value by providing column name and data type of the column. This supports almost all the data types which are supported in JDBC.

In order to use this processing element, you must first select the Database Operations dependency from the processor list when you are creating an empty Ultra project. If you have already created a project, you can add this dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Processors list, select the Database Operations dependency.

result set reader outports

Out Ports

Next

Message will be forwarded to this port after setting the read value from the Result Set as a scope variable.

On Exception

The message context will be sent to this outport if any exception occurred while extracting the payload from the message.

Parameters

Result Set Variable Name

Basic

Name of the scope variable that contains the Result Set as value.

  • If this parameter is not set, The processing element will look for a string scope variable with the key result_set.reference.constant.name and if found, its value will be used as the value of this parameter.

  • If such scope variable is also not found, the value result_set.reference will be used as the value of this parameter.

Variable Name *

Basic

Name of the variable to set the extracted value from the result set.

Column Name *

Basic

Name of the column to read the value.

Column Data Type *

Basic

JDBC data type of the column to be read.

Sample Use Case

In this documentation, it’s used the same sample use case which has been used in Row Locking Processor. In this use case, the requirement is to do a database update with multiple threads by polling the database to select possible candidates for the update. A single row should be updated by a single thread to make sure the consistency of the database. Because of that it’s required to get a row lock of a row before starting process and then do required update and mark it as a processed row to make sure that it won’t be picked up for later.

row lock starting processor1

In this flow a Result Set Reader processing elements is configured to read a column value and set that value as scope variable which has a configurable name.

In this topic
In this topic
Contact Us