
Specialist III
2015-06-23
06:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
215 Views
2 Replies

Anonymous
Not applicable
2015-06-24
07:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
215 Views

Anonymous
Not applicable
2015-06-24
07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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....
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"))
215 Views
