Executing multiple sql files (Oracle)

One Star

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 Smiley Happy
Moderator

Re: Executing multiple sql files (Oracle)

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
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Sixteen Stars

Re: Executing multiple sql files (Oracle)

How about the following layout....

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"))