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.
Community Manager

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

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog