[resolved] Access the results of tOracleInput in another tOracleInput

One Star

[resolved] Access the results of tOracleInput in another tOracleInput

Hi,
first I do a select on one table:
select id, edition, relasedate from print;
Next there is a reference table to query BUT with the results from the first query:
select srctable, desttable, detid from refs
WHERE srcid = FIRST_STATEMENT.id;
And I've got another two or three tables to query.
So, it's a join - but I need the results of the previous query for the where clause.
How can I do it in talend?
Thank you in advance.
Bye, Chris

Accepted Solutions
One Star

Re: [resolved] Access the results of tOracleInput in another tOracleInput

Hi,
I solved it on my own.
I just didn't know that I can use the Var in the middle of tMap.
The way I did it wasn't working (see screenshot)
Thank you Smiley Happy
Bye, Chris

All Replies
Community Manager

Re: [resolved] Access the results of tOracleInput in another tOracleInput

Hello Chris
You can use the tFlowToIterate component, eg:
tOracleInput_!--row1-->tFlowToIterate-->tOracleInput_2-->do other transcation
On tOracleInput_2, type in the query like this:
"select srctable, desttable, detid from refs
WHERE srcid ="+(Integer)globalMap.get("row1.id")
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Access the results of tOracleInput in another tOracleInput

Thank you Shong it works.
But I need a to have two values from tOracleInput_1 in my tMap1.
I want to have values from tOracleInput_1 AND tOracleInput_2 in my tfileOutputExcel_1.
Unfortunately I can't access globalMap.something or row1.something in tMap Smiley Sad
What should I do now?
Bye, Chris
Community Manager

Re: [resolved] Access the results of tOracleInput in another tOracleInput

Hello
Please decribe your problem more detailed, where/why do you say you I can't access globalMap.something or row1.something in tMap? a screenshot of tMap will be better.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Access the results of tOracleInput in another tOracleInput

Hi,
I solved it on my own.
I just didn't know that I can use the Var in the middle of tMap.
The way I did it wasn't working (see screenshot)
Thank you Smiley Happy
Bye, Chris