Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
[note: i am using Talend open studio for BigData v7.1]
I have this use case where I need to grab an SQL script file and execute it against MySQL at run time and then export that query result set to an Excel sheet.
I was able to do this by putting in the SQL statement in tFileInput etc.. and also exporting the results of that query to an excel sheet.
BUT i have multiple SQL script files, how would i grab all the SQL script files from a folder on disk and execute them sequentially to MySQL then export the results of each query to an Excel sheet in one Excel workbook.
So i am lost in terms of how to Loop/Iterate thru these files.
Hope someone can help me out with this.
Hi,
If you have more than one SQL script files, then you will have to add one more outer loop using tFileList to pick all the necessary files and loop them.
You can try the custom component provided by Jan but I have not personally used this component. He is a master of Talend and quite popular among Talend community. So please discuss with him in case your preference is to use the custom component.
If you are happy with the details, could you please spare a second to mark the topic as resolved? Quite often, many Talend community members ask queries but once they get answers, they miss to close the post. Marking a query as resolved will help other Talend community members during their reference and its a way of telling thank you to the contributor for spending his time in between their normal work.
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 🙂
Hi nikhilthampi,
Thanks for your recent reply, the tFileList, i have seen reference to this, but i have no idea how to do a loop in talend, i can't seem to find how to do this when i search online, i can't find it.
I want to learn the looping way that you suggest as well as seeing how i can use the component made by Jan Lolling.
How would i be able to get in touch with him.
Regards,
P
Hi,
Please refer the below link for scenario.
https://help.talend.com/reader/iYcvdknuprDzYycT3WRU8w/JOZlAPo0RA9zysKvch~GJg
Jan is already in Talend community. So you can send a message to him if you have any query with custom component.
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 🙂