One Star

passing multiple queries to tOracleRow

Hi,
I want to iterate through 40+ SELECT statements currently held in an Excel spreadsheet..pass them to an OracleRow ....and output the results to another excel spreadsheet. Appending the results of each SQL statement to the end.
I currently have a job with a tFileInputExcel and tOracleRow component. I want to pass each SQL statement (held in one column in one sheet) into the query of the tOracleRow.
Any guidance would be great. I think I need a parameter / variable just cant see how to set it all up.

Regards,
Michelle
3 REPLIES
Moderator

Re: passing multiple queries to tOracleRow

Hi,
For your use case, you use TalendHelpCenter:tContextLoad component to achieve that.
To make it clear, I have designed a demo job for you.
The workflow should be: tfixedflow(tfileinputxxx)-->tcontextload-->oncomponentOk-->tMysqlinput-->tfileoutputxxx
Please see my screenshots for details

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.
One Star

Re: passing multiple queries to tOracleRow

How about this?
See the screenshots... The tJava is just a way to expose the row so you can use it in tOracle... And the schema of the Excel Spreadsheet is a single column named 'SQLScript' which holds the text of the SQL query from every row in the spreadsheet.
Moderator

Re: passing multiple queries to tOracleRow

Hi,
Is there any update for your topic? Is the solution satisfying your needs?
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.