Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Multiple Insert when calling a stored procedure

Hi there,
I am new to Talend and creating my first talend job.  I downloading a file and then calling a stored procedure to insert it into an oracle table.  The issue I am running into is, when I run the job, it is inserting each record in the file multiple times.  For instance there are seven records in the file and its inserting 7 iterations of that into the table.
I think I must be missing a component but not sure which one.
Any help would be much appreciated.
Thanks!
Giselle
Labels (2)
1 Solution

Accepted Solutions
_AnonymousUser
Specialist III
Specialist III

Hello giselle,

I suspect you have given a main connection to the  toraclesp  component which is executed as many times as the number of rows you have in the input file. To fix this you should use on component OK or On Subjob ok link from the main job loading data from file to a table first. 
tfileInput>>tmap>>toracleoutput_1 (table used to load the file into)>> (On component OK/On Subjob OK) toraclesp  >>toracle_oputput_2
Regards,
Praveen K Bandi

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi,
Could you please indicate which component you are using in your job?
Have you already checked component  TalendHelpCenter:tOracleSP which is used to  call the database stored procedure.
Here is a KB article about:TalendHelpCenter:Calling a stored procedure or function
Best regards
Sabrina
Anonymous
Not applicable
Author

Hello there,
Yes I am using the tOracleSP.  That is where I am having the issue.  I am using the following components:
tfileInput>>tmap>>toracleoutput_1 (table used to load the file into)>>toraclesp (calling my stored procedure that inserts into table from the file data))>>toracle_oputput_2(oracle table my procedure inserts into)
I re-attached the screen shot within the job.
Thanks!
Giselle
_AnonymousUser
Specialist III
Specialist III

Hello giselle,

I suspect you have given a main connection to the  toraclesp  component which is executed as many times as the number of rows you have in the input file. To fix this you should use on component OK or On Subjob ok link from the main job loading data from file to a table first. 
tfileInput>>tmap>>toracleoutput_1 (table used to load the file into)>> (On component OK/On Subjob OK) toraclesp  >>toracle_oputput_2
Regards,
Praveen K Bandi