Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm new to Talend.
I have a job like in the screenshot attached.
I want to use the input_row variable, but I don't understand what kind of object it is.
From the code it looks like a class that implements a system routine.
How can I interact with it? Let's say that I want to access each single object, or even check the length of this input_row (if it can be treated as an array), how can I do it?
Thanks,
Nick
The input_row is simply the row that feeds the tJavaRow. I do not know why Talend have done this (since the tJavaFlex allows you to simply use the row name feeding and leaving it for you to work with), but it simply acts a row. When assigning output values, you would use the output_row. So, if the row feeding the tJavaRow has 3 columns (column1, column2 and column3), you can use the input_row placeholder to get access to the values like below...
String column1 = input_row.column1; String column2 = input_row.column2; String column3 = input_row.column3;
If you only have one output_row column (concatColumn) and want to send the data out concatenated (as a simple example), you might do this after the above...
output_row.concatColumn = column1+column2+column3;
It's as easy as that.
The input_row is simply the row that feeds the tJavaRow. I do not know why Talend have done this (since the tJavaFlex allows you to simply use the row name feeding and leaving it for you to work with), but it simply acts a row. When assigning output values, you would use the output_row. So, if the row feeding the tJavaRow has 3 columns (column1, column2 and column3), you can use the input_row placeholder to get access to the values like below...
String column1 = input_row.column1; String column2 = input_row.column2; String column3 = input_row.column3;
If you only have one output_row column (concatColumn) and want to send the data out concatenated (as a simple example), you might do this after the above...
output_row.concatColumn = column1+column2+column3;
It's as easy as that.
Did this answer your question?
the logic behind is quite weird, but yes I guess that answers my question. Thank you!