[resolved] Put a result into context variable

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

View solution in original post


All Replies
Five 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

View solution in original post

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