tSampleRow not resolving context variable

Highlighted
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.

View solution in original post


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.

View solution in original post

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.


 

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog