
Anonymous
Not applicable
2017-01-04
06:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to execute Oracle sql script in talend ?
Hi,
I have Oracle SP that return a sql path and I stored it in a context variable.
Now I need to execute this sql script in talend (like we execute it in sql plus --> @ sqlscript.sql )
Is there any similar component in talend to do this task. (I tried it in tOracleRow but it execute only Select & DML queries)
I am also thinking to implement it in tJava/tJavaRow component (by writing java code) ...is this a correct way ?
Kindly assist.
Regards,
Rakesh D
I have Oracle SP that return a sql path and I stored it in a context variable.
Now I need to execute this sql script in talend (like we execute it in sql plus --> @ sqlscript.sql )
Is there any similar component in talend to do this task. (I tried it in tOracleRow but it execute only Select & DML queries)
I am also thinking to implement it in tJava/tJavaRow component (by writing java code) ...is this a correct way ?
Kindly assist.
Regards,
Rakesh D
476 Views
6 Replies

Anonymous
Not applicable
2017-01-04
07:14 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Take a look at this related https://community.talend.com/t5/Design-and-Development/resolved-Execute-Script-sql-to-Oracle-from-fi..., or try the custom component tSQLScriptParser shared by jlolling on Talend Exchange.
Regards
Shong
Take a look at this related https://community.talend.com/t5/Design-and-Development/resolved-Execute-Script-sql-to-Oracle-from-fi..., or try the custom component tSQLScriptParser shared by jlolling on Talend Exchange.
Regards
Shong
476 Views

Anonymous
Not applicable
2017-01-04
08:43 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shong,
I have downloaded the TSQLScriptParser (its a zip file) but not able to understand where I need to keep this file/folder.
Can you please help ?
I have extracted this file and it consist of 2 folder tSQLScriptParser and __MACOSX and they have few files (.xml/javalet/jar) but not sure where I have to place these files.
Regards,
Rakesh D
I have downloaded the TSQLScriptParser (its a zip file) but not able to understand where I need to keep this file/folder.
Can you please help ?
I have extracted this file and it consist of 2 folder tSQLScriptParser and __MACOSX and they have few files (.xml/javalet/jar) but not sure where I have to place these files.
Regards,
Rakesh D
476 Views

Anonymous
Not applicable
2017-01-04
08:48 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shong,
Do I need to place extracted folder under this path:
C:\Program Files (x86)\Talend-Studio\studio\plugins\org.talend.designer.components.sparkstrprovider_6.2.1.20160704_1411\components
As I can see other components' folders are there.
Please confirm.
Regards,
Rakesh D
Do I need to place extracted folder under this path:
C:\Program Files (x86)\Talend-Studio\studio\plugins\org.talend.designer.components.sparkstrprovider_6.2.1.20160704_1411\components
As I can see other components' folders are there.
Please confirm.
Regards,
Rakesh D
476 Views

Anonymous
Not applicable
2017-01-04
09:44 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shong,
I was able to load the tSQLScriptParser component by installing it properly but its not able to execute the sql script (I am getting "File Not found") even I have given the proper file name in the File *.sql.
Then I read some other post related to this and they said that we can use tFileInputFullRow--> tOracleRow to execute sql script.
I have given the complete file path in the tFileInputFullRow and then I used ((String)globalMap.get("sql")) in the Query section of tOracleRow component but getting error:
SQL statement to execute cannot be empty or null
Am I doing any mistake?
I was able to load the tSQLScriptParser component by installing it properly but its not able to execute the sql script (I am getting "File Not found") even I have given the proper file name in the File *.sql.
Then I read some other post related to this and they said that we can use tFileInputFullRow--> tOracleRow to execute sql script.
I have given the complete file path in the tFileInputFullRow and then I used ((String)globalMap.get("sql")) in the Query section of tOracleRow component but getting error:
SQL statement to execute cannot be empty or null
Am I doing any mistake?
476 Views

Anonymous
Not applicable
2017-01-04
10:26 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
Even I use tSystem to execute sqlscript by (I am passing my sql script complete path in the context variable)
"cmd /c echo HELLO & sqlplus dbuser/*****@DBNAME & @" +context.Script_File_path+" "
it is executing without any error but it did not create file (this script create spool file by executing select statement)
Even I use tSystem to execute sqlscript by (I am passing my sql script complete path in the context variable)
"cmd /c echo HELLO & sqlplus dbuser/*****@DBNAME & @" +context.Script_File_path+" "
it is executing without any error but it did not create file (this script create spool file by executing select statement)
476 Views

Anonymous
Not applicable
2017-01-09
02:43 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
tSQLScriptParser is a custom component, to be honest, I have not used it. Please refer to this KB article about how to install a custom component, make sure you have installed into studio correctly.
See this https://community.talend.com/t5/Design-and-Development/resolved-Execute-Script-sql-to-Oracle-from-fi..., there should be a tJavaFlex component between tFileInputFullRow and tOracleRow.
Regards
Shong
tSQLScriptParser is a custom component, to be honest, I have not used it. Please refer to this KB article about how to install a custom component, make sure you have installed into studio correctly.
Then I read some other post related to this and they said that we can use tFileInputFullRow--> tOracleRow to execute sql script
See this https://community.talend.com/t5/Design-and-Development/resolved-Execute-Script-sql-to-Oracle-from-fi..., there should be a tJavaFlex component between tFileInputFullRow and tOracleRow.
Regards
Shong
476 Views
