One Star

How to execute multiple SQL statements using a single postgres input

Please tell me the way, How to execute multiple SQL statements using a single postgres input?
2 REPLIES
Moderator

Re: How to execute multiple SQL statements using a single postgres input

Hi,
Please see the related KB article on Talend Help Center Executing multiple SQL statements with one tMysqlRow component.
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.
Seventeen Stars

Re: How to execute multiple SQL statements using a single postgres input

In Talend exists no build-in component to do this job (except for MySQL because the MySQL server parse a statement always as script).
For this purpose I have created the component tSQLScriptParser.
http://www.talendforge.org/exchange/index.php?eid=724&product=tos&action=view
Usage: tSQLScriptParser -- (iterate) --> tPostgresqlRow (with the current SQL statement return value from tSQLScriptParser_1)
You have to decide if the tPostgresqlRow component create its own connection (and commits every statement) or use a separate connection to run the script within one transaction.