Hi @Tej ,
Thankyou for using Microsoft Q&A platform and thanks for posting your question here.
As I understand your question, you want to run stored procedures using stored procedure activities in ADF pipeline, the procedures are present in synapse SQL scripts which is being fetched by the web activity. Please let me know if my understanding is incorrect.
There is no direct way to achieve this , the workaround I can suggest is to use LookUp activity pointing to SQL database and use the following query:
declare @webactivityoutput varchar(max) set @webactivityoutput = '@{activity('Web1').output.value}' select substring(query,CHARINDEX('[',query)-1,(CHARINDEX(']',query,CHARINDEX('.',query))+1)-(CHARINDEX('[',query)-1)) as procname from OpenJSON(@webactivityoutput) with(query varchar(max) '$.properties.content.query')
After lookup , use foreach activity to iterate through each of the stored proc names and inside foreach , use stored procedure activity where in stored procedure name provide @item().procname
Please check the below video for reference:
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button and take satisfaction survey whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators