Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
houssem_B
Contributor III
Contributor III

extract all tables from database

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 

Labels (2)
11 Replies
Anonymous
Not applicable

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 🙂

akumar2301
Specialist II
Specialist II

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