Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone
I have more than 70 tables in my database(Mysql), so I want to extract all of them in the same job.
I used to extract them with tDBInput (one component for each table) but since the number of tables is in growth I'm searching for an optimized solution.
Thanks
I agree with you @rhall 🙂
It was a solution created for one of the customer. Since it might be interesting, we converted it to a KB article.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
To make it dynamically ,
select column details for each table dynamically with table INFORMATION_SCHEMA and with these information
create select statement which returns concatenation of all columns.
E.g if table "test" has column id and name
Creare you sql sentence like
Select concat_ws(‘;’,id,name) from test
Create this sql for each table in iteration and for each sql statement run tdbinput having schema column name “allcolumn”.
Now tfileoutputdelimited and dump result. You will have all tables in separate file with columns semicolon separated.
https://stackoverflow.com/questions/23348170/mysql-concatenating-all-columns