Tuesday 18 November 2014

Using tJavaRow - input_row and output_row (for row by row transformation)


Using tJavaRow - input_row and output_row (for row by row transformation)

In this post i will like to explain a very simple and basic usage of tJavaRow.
Lets say you need to do some transformation on every row of your input data. You can do this by using tMap, tJavaFlex, tJavaRow and others.
for now i will focus on tJavaRow. Its a good practice to use input_row and output_row as objects which can be used to fetch values of your columns. 

using tJavaRow

Fixedflowinput returns two rows and we pass each row via tJavaRow and append text "-XYZ" to name and finally pass this as output to tLogRow.
code of tJavaRow...notice the usage of input_row and output_row here..

output_row.id = input_row.id;
output_row.name = input_row.name+"-XYZ";