Talend - ELT DB Components (tELTMysqlInput, tELTMysqlMap,tELTMysqlOutput)
Talend provides us some ELT components which are very useful if you want to do a INSERT, UPDATE, DELETE using SQL for example
INSERT INTO target_table
select a.col1, a.col2....
FROM source_table1 a
INNER source_table2 b on (a.col1=b.col1)
These components gives you performance boost for operations where you do not need to bring data to talend server/machine (where job is executing). Using depends on your requirements.
Example -
I have a city and country table in my mysql sakila DB.
I want to join city and country table data and insert into new table country_city using ELT component.
I have to use tELTMysqlInput (for input tables), tELTMysqlOutput (for ouput tables), tELTMysqlMap for join conditions
tELTMySqlMap - editor where we can specify joins, where/group by conditions |
`` |
Job log after execution - you can see the insert sql in log
[statistics] connecting to socket on port 3572
[statistics] connected
Inserting with :
INSERT INTO country_city(country_id,country,city_id,city) (SELECT country.country_id , country.country , city.city_id , city.city FROM country , city WHERE city.country_id = country.country_id )
--> 600 rows inserted.
[statistics] disconnected
Job jobforblog ended at 05:37 09/10/2013. [exit code=0]
No comments:
Post a Comment