Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
EvoticTalend
Contributor
Contributor

I have a Stored Procedure in SQL Server... How can I call it in Talend?

I have a Stored Procedure which calls another in my DDBB in SQL Server. How can i call him to be executed automatically in the flow of the job?

Labels (3)
6 Replies
gjeremy1617088143

Hi, you can use the TDBSP component ,

https://help.talend.com/r/jomWd_GKqAmTZviwG_oxHQ/Y4ldtMoTiuC0d9L2HNRqzw

Send me Love and Kudos

EvoticTalend
Contributor
Contributor
Author

Thank you for telling me the component gjeremy :)!

 

I have a doubt, mmmm... I have a flow thand sends excels to a DB.

 

Now I want to only execute my PROCEDURE IN SQL SERVER (the procedure creates and inserts a new table in my SQL Server DB), how would be connected with the other components? Running the job like this (putting the TDBSP alone and running it, doesn't work)

 

 

0695b00000Gf6zmAAB.png 

 

 

Anonymous
Not applicable

If you don't want other components to run, you can deactivate the subjobs. To do: right click the first component of subjob, and select 'deactivate the whole subjob' option.

0695b00000Gf8X9AAJ.png

gjeremy1617088143

have you read the scenario on the link i send you ? There is an example of how to use it, you have to use a TParseRecordSet to read the return of the SP.

You can also use a tDBRowComponent and write in directly the transact sql you want to execute.

Send me Love and Kudos

EvoticTalend
Contributor
Contributor
Author

Hi gjeremy, thanks. Yes, I reviewed the example but I dont know if it's the same as I want.

 

In my SQL Server procedure I have a SELECT and an INSERT in a new table.

 

The problem is I don't know what schema I have to put in the TDBSP component and the TParse. The schema of the new table created?

 

Thank you.

gjeremy1617088143

you have to set the result of the stored procedure, if it's just intern sql and not a request to get data , in general it return a boolean wich represent the succes of the execution.