tSampleRow not resolving context variable

Five Stars

tSampleRow not resolving context variable

Environment Info:

Talend Real-time Big Data Platform (6.4.1.20170623_1246)

Windows 10

 

tSample row component not resolving value of context variable.

Attached is the simple usage of tSampleRow.

tJavaRow_3 component:

String range = "1,33";
context.range = range;

Expression in tSampleRow:

context.range

Any clues?

 


Accepted Solutions
Employee

Re: tSampleRow not resolving context variable

Assign value to contect variable via directly or load via file & then use, it will work.  Value set in tjavarow is not globally set thus tsamplerow unable to understand. 

 

Please refer attached screenshot, tSampleRow properly able to read context. Also find attached sample tSample_row_context.JPGtSample_row_context2.JPGtSample_row_context3.JPGjob.


All Replies
Employee

Re: tSampleRow not resolving context variable

Assign value to contect variable via directly or load via file & then use, it will work.  Value set in tjavarow is not globally set thus tsamplerow unable to understand. 

 

Please refer attached screenshot, tSampleRow properly able to read context. Also find attached sample tSample_row_context.JPGtSample_row_context2.JPGtSample_row_context3.JPGjob.

Five Stars

Re: tSampleRow not resolving context variable

Didn't know about that tJava part.

Also I tried to set value in global map but I wasn't able to resolve it because of typecasting issues.

 

I managed to do that with other logic.

 

Thanks for clearing the confusion.


sjain wrote:

Assign value to contect variable via directly or load via file & then use, it will work.  Value set in tjavarow is not globally set thus tsamplerow unable to understand. 

 

Please refer attached screenshot, tSampleRow properly able to read context. Also find attached sample tSample_row_context.JPGtSample_row_context2.JPGtSample_row_context3.JPGjob.



sjain wrote:

Assign value to contect variable via directly or load via file & then use, it will work.  Value set in tjavarow is not globally set thus tsamplerow unable to understand. 

 

Please refer attached screenshot, tSampleRow properly able to read context. Also find attached sample tSample_row_context.JPGtSample_row_context2.JPGtSample_row_context3.JPGjob.