Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
cmccarthy1676460227
Contributor
Contributor

Read data from file and use SQL in a loop to DBInput

Hi

Can I get ideas, the scenario is

list of data in a CSV file, like name, database, tablename, frequency

would like to loop trough list of tables from file and pass to dBInput pipeline - can't use tablelist as case sensitive

thanks in advance

Labels (3)
1 Reply
Anonymous
Not applicable

Hi

You can use tFlowToIterate to iterate each row of data read from file, eg:

tFileInputDelimimited--main(row1)--tFlowToIteratate--iterate--iterate--tDBInput--main--tLogRow

 

on tDBInput: use the current tablename in the query, eg:

"select id, name from "+(String)globalMap.get("row1.tablename")

 

About usage of tFlowToIterate component, please read the component documentation.

https://help.talend.com/r/en-US/8.0/orchestration/tflowtoiterate

 

if the tables have different structure, you need to use the dynamic schema.

 

Regards

Shong​