tOracleInput

Highlighted
Five Stars

tOracleInput

Hello, I'm having three identical databases in termes of structure (tables and columns), one for each country.
Example: the table customer exists in the three databases with same fields. Only the content is different because every country has its own client.

i want to load the three tables in on the single table in the destination, normally I would use three tOracleInput 
Then add a value to indicate the country name in a tamp for each of the three and then concatenate all in a tUnite.

But since the three databases have the same exactly architecture,I want to do it in one single tOracle input and 
execute the same sql statement "select code, nom from the customer" but on the three different databases.
i though about using context variable and tLoop but i am having problems to correctly design a functional job. 


Accepted Solutions
Community Manager

Re: tOracleInput

Hi
Use context variables for db connection parameters, and use a tfixedFlowInput to generate the variable value.
tFixedFlowInput--main(row1)--tFlowToIterate--tjava--oncomponentok-->tOracleInput--tUnite-->

on tFixedFlowInput, select 'Use inline content' model, and input the variable value like
host1;database_name1;port1;username1;password1
host2;database_name2;port2;username2;password2
host3;database_name3;port3;username3;password3

on tjava:
context.host=(String)globalMap.get("row1.host")
....the same for other parameters...

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: tOracleInput

Hi
Use context variables for db connection parameters, and use a tfixedFlowInput to generate the variable value.
tFixedFlowInput--main(row1)--tFlowToIterate--tjava--oncomponentok-->tOracleInput--tUnite-->

on tFixedFlowInput, select 'Use inline content' model, and input the variable value like
host1;database_name1;port1;username1;password1
host2;database_name2;port2;username2;password2
host3;database_name3;port3;username3;password3

on tjava:
context.host=(String)globalMap.get("row1.host")
....the same for other parameters...

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: tOracleInput

thx you Smiley Happy)

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

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

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