Procedure
- Create a Job named CallRoutineDemo, composed of a tFixedFlowInput, a tMap and a tLogRow component linked by two main rows:
- Double-click tFixedFlowInput to open its Basic settings view of the Component tab.
- Check the Use Inline Content(delimited file) button and add 123456 and abcd in the content field, in order to generate input data.
-
Click the ellipsis button (...) to edit the schema and add a new column named
source_data, as shown below.
- Double-click tMap to configure it, drag and drop the Source_data row in the output table.
-
In order to call the routine, add a new column in the output named
New_data and enter
MyRoutineDemo.reverseString(row1.source_data) into
the expression box of the new column:
- Double-click tLogRow to configure it and select the print the result on the console with table model button.
-
Execute the Job. The following results will be shown in the console:
Starting Job CallRoutineDemo at 12:18 24/07/2014. [statistics] connecting to socket on port 3987 [statistics] connected .-----------+--------. | tLogRow_1 | |=----------+-------=| |source_data|new_data| |=----------+-------=| |123456 |654321 | |abcd |dcba | '-----------+--------' [statistics] disconnected Job CallRoutineDemo ended at 12:18 24/07/2014. [exit code=0]