[resolved] string value not passed to tjava

Six Stars

[resolved] string value not passed to tjava

Hello.
I'm facing the wierdest thing, and can't put my finger on it.
I'm reading a file with tFileInputDelimited which contains one row and one column.
The schema is a single String column.
When reading the file and sending it to tLogRow it prints it.
After that the main connection is linked to tJava which had System.out.println(row2.strVal).
the value printed is null.
After that the main connection is linked to another tLogRow which prints the string.
This means that the string passes correctly between the components, but for some reason when 
passed to java, is set to null.
tFileOutputDelimited ---> tLogRow ---> tJava ---> tLogRow
Any ideas?

Accepted Solutions
Community Manager

Re: [resolved] string value not passed to tjava

Hi 
If you want to access the input data, you should use tJavaRow instead of tJava, eg:
tFileOutputDelimited ---> tLogRow ---> tJavaRow ---> tLogRow

on tJavaRow:
System.out.println(input_row.strVal);
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] string value not passed to tjava

Hi 
If you want to access the input data, you should use tJavaRow instead of tJava, eg:
tFileOutputDelimited ---> tLogRow ---> tJavaRow ---> tLogRow

on tJavaRow:
System.out.println(input_row.strVal);
----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

Re: [resolved] string value not passed to tjava

Thanks, Shong, 
It works, but I thought when I used the connection name in the tJava - it'll work.