Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now

Reply
jlakshminaraya
Frequent Visitor

How to call multiple procedures in sequence or concurrent in Microsoft Fabric Factory

How to call multiple procedures in sequence or concurrent in Microsoft Fabric Factory

2 ACCEPTED SOLUTIONS

Hi @jlakshminaraya 
Thanks for using Fabric Community.
You can achieve the above requirement by using a layout as shown below:

vnikhilanmsft_0-1707326234251.png

 


Hope this helps. Please let me know if you have any further queries.

View solution in original post

Hey,

The variable has the SP names :

dbo.sp1;dbo,sp2


the split function splist this variable into an array which is iterated over the for each.

 

And the item() is basically the iteration value so it would be dbo.sp1 or dbo.sp2 which is passed over within the sp activity.

 

So the SP activity to execute those SPs.

 




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

View solution in original post

7 REPLIES 7
jlakshminaraya
Frequent Visitor

jlakshminaraya
Frequent Visitor

Thanks @NandanHegde for your time and detail explanation. 

In step 3, do i need to import all 5 stored procedures inside of "for each" and edit the settings of each procedure? 

if yes, stored procedure name on each is SP setting is @item() is final , or something to be enterd?

If No, what is the body  of stored procedure you have imported in step?

 

Thanks,

Lakshmi Narayana

 

Hey,

The variable has the SP names :

dbo.sp1;dbo,sp2


the split function splist this variable into an array which is iterated over the for each.

 

And the item() is basically the iteration value so it would be dbo.sp1 or dbo.sp2 which is passed over within the sp activity.

 

So the SP activity to execute those SPs.

 




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
NandanHegde
Super User
Super User

Hey @jlakshminaraya 


The details provided by @v-nikhilan-msft  is correct but it is too manual and in case of new additions, you would have to manually add in new activities.

 

The below design is a meta data driven flow :

1) Create 2 variable like ParallelExecution and Sequentailexecution with semicolon seperated values

 

wherein values would your SPname1;spname2 etc

NandanHegde_0-1707365304276.png

 

2) use 2 foreach activities one for parallel execution and another one for sequential execution with values for thier settings :

NandanHegde_1-1707365446473.png

 

value : 

@split(variables('ParallelExecutionSPs'),';')
 
 
Similarly for sequentail :
NandanHegde_2-1707365498545.png

 

@split(variables('SequentailExecutionSPs'),';')
 
3) within for each , use stored procedure activity
NandanHegde_3-1707365557636.png

similar would be for sequentail foreach as well

 

 

hope this helps.

 

You can even have the variable as type array and directly use in foreach as is if need be




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com
v-nikhilan-msft
Community Support
Community Support

Hi @jlakshminaraya 
Thanks for using Fabric Community.
Can you please explain your ask a little bit more? So that I can help you better.
Thanks.

Hi @jlakshminaraya 
Thanks for using Fabric Community.
You can achieve the above requirement by using a layout as shown below:

vnikhilanmsft_0-1707326234251.png

 


Hope this helps. Please let me know if you have any further queries.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebFBC_Carousel

Fabric Monthly Update - February 2025

Check out the February 2025 Fabric update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.