[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
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
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 ?

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

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

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now