[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
One Star

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
One Star

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

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch