Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
dilmaraferreira
Partner - Contributor II
Partner - Contributor II

Automatically load multiple tables from a database

Good Morning,

Well, I am researching how to load several tables from a database (Oracle, SQL Server, Firebise and etc). However, I would like to know if you have a way to load an X number of tables through a loop, that is, you would not need to write several lines of code.

It would be possible? If so, an example or structure can be submitted. I checked several articles and they are based on Excel and QVD files, however the idea is to work with a database.

Thank you very much in advance

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, you can use a loop.

If you know the tablenames you want to load, you can load the names into a table and iterate the table with either peek() or FieldValue(). 

If you want to discover what tables are in a database catalog, use the SqlTables script statement. 

-Rob

dilmaraferreira
Partner - Contributor II
Partner - Contributor II
Author

Would you have a script template? I found a way to load all the tables from a database. However, I will have problems because not all the loaded tables are necessary.

Model that bases me: https://community.qlik.com/t5/Qlik-Brasil/MySQL-to-QVD/gpm-p/1489476