[resolved] Put a result into context variable

One Star

[resolved] Put a result into context variable

Hi !
I have a query which gets the maximum enumerator from a AS400 table (select max(xxxx) from ...). After that, I would like to put this value into a context paramter.
Have you got and idea ?
Thanks a lot.
Kim

Accepted Solutions
Highlighted
Two Stars

Re: [resolved] Put a result into context variable

Hi Kim,
Since the result of "select max(xxxx) from ..." will only return one row, use a tJavaRow (or tPerlRow) after the t*Input.
context.count = input_row.count

Cheers,
c0utta

All Replies
Highlighted
Two Stars

Re: [resolved] Put a result into context variable

Hi Kim,
Since the result of "select max(xxxx) from ..." will only return one row, use a tJavaRow (or tPerlRow) after the t*Input.
context.count = input_row.count

Cheers,
c0utta
One Star

Re: [resolved] Put a result into context variable

Thanks a lot !
It works fine ;-)
kim
Two Stars

Re: [resolved] Put a result into context variable

Hi, everyone!

 

I have a context variable RowCount, and I need to write javacode  which will input row count into this variable.

this code doesn't work:

context.RowCount = input_globalMap.put("tFileRowCount_1_COUNT");

 

Can u help me ?

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog