Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Executing multiple sql files (Oracle)

Hi all, 
I have multiple sql scripts in a local folder, and I'd like to run these scripts and based on these scripts create table, load data, add column, patch procedures/fucntions etc.
(I can't upload screenshot due to some reason though I am already registered here)
tOracleConnection_1 -> tFileList_1 -> tFileInputDelimited_1 -> tOracleRow_1
the problem is that I don't know how to get the sql statements from each file during iteration from tFileInputDelimited_1 component, and what to fill in Query parameter for TOracleRow_1. Perhaps, this can be done via contexts but I'm not sure how to do that either.
Any help? Thanks a lot  0683p000009MACn.png
Labels (2)
2 Replies
Anonymous
Not applicable

Hi,
Please take a look at a related forum:https://www.talendforge.org/forum/viewtopic.php?id=10132.
What does your sql script look like?
Best regards
Sabrina
Anonymous
Not applicable

How about the following layout....
0683p000009ME4I.png
Use a tFileInputRaw and output the contents as a String. Then connect the output to a tFlowToIterate. Then iterate the tOracleRow and use the globalMap variable associated with the content from the tFileInputRaw in your tOracleRow. In the case above it would be....

((String)globalMap.get("row1.content"))