This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Question:
I’m working with a pipeline in Microsoft Fabric where I use a ForEach activity to load multiple tables from a Lakehouse into a Warehouse.
Inside the ForEach, I use a Script activity that dynamically builds and executes SQL based on item().TableName. Functionally everything works fine.
However, in the pipeline run view I only see the same activity name repeated multiple times (e.g. Script2), without any indication of which table is being processed in each iteration.
My question:
Is there a way to make the table name visible per iteration in the pipeline run UI (for example in the activity list or overview)?
What I’ve already tried:
Ideally, I would like to see:
Am I missing something in Fabric pipelines, or is this currently not supported?
Thanks in advance!
Solved! Go to Solution.
Hi @SjoerdW,
Thanks for reaching community. will Happy to assist.
Dynamic activity names in ForEach are not supported in Fabric pipelines currently but there are workarounds to achieve visibility per iteration. Below are the possible work arounds to achieve this.
Add a Set Variable activity as the first step inside your ForEach, before the Script activity:
Result: In the pipeline run view, the Set Variable activity output will show the table name in its input/output details, making it traceable per iteration.
To see which table failed, add a Fail activity on the failure path of your Script activity:
This way the failure message in the pipeline run view explicitly shows the table name that caused the error.
ForEach
└── Set Variable (CurrentTableName = @item().TableName)
└── Script Activity
├── Success → (continue)
└── Failure → Fail Activity
Message: @concat('Failed on table: ', item().TableName)
Error Code: 500
Create an Array variable ProcessedTables and append each table name as it processes:
-- In your Script activity, add this alongside your existing SQL:
INSERT INTO dbo.PipelineLog
(PipelineRunId, TableName, Status, StartTime)
VALUES
('your-run-id', '@{item().TableName}', 'Processing', GETDATE())Hi @SjoerdW,
The way I would approach this is to use an "append variable" activity inside the for each loop that will append the table name to a variable, then you can access that variable outside of the loop.
Proud to be a Super User! | |
Hi @SjoerdW,
Thanks for reaching community. will Happy to assist.
Dynamic activity names in ForEach are not supported in Fabric pipelines currently but there are workarounds to achieve visibility per iteration. Below are the possible work arounds to achieve this.
Add a Set Variable activity as the first step inside your ForEach, before the Script activity:
Result: In the pipeline run view, the Set Variable activity output will show the table name in its input/output details, making it traceable per iteration.
To see which table failed, add a Fail activity on the failure path of your Script activity:
This way the failure message in the pipeline run view explicitly shows the table name that caused the error.
ForEach
└── Set Variable (CurrentTableName = @item().TableName)
└── Script Activity
├── Success → (continue)
└── Failure → Fail Activity
Message: @concat('Failed on table: ', item().TableName)
Error Code: 500
Create an Array variable ProcessedTables and append each table name as it processes:
-- In your Script activity, add this alongside your existing SQL:
INSERT INTO dbo.PipelineLog
(PipelineRunId, TableName, Status, StartTime)
VALUES
('your-run-id', '@{item().TableName}', 'Processing', GETDATE())Hi @SjoerdW ,
I would like to take a moment to thank @Lodha_Jaydeep , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Hi @SjoerdW ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you
Hi @SjoerdW,
Does the issue getting fixed or not? Feel free to reach out in case of any issues you are having will happy to assist.
@everyone just keep you heads For transparency, I used an AI tool to help structure my previous response, though I have personally verified all the steps and logic provided.
Hello @SjoerdW
Your observation is correct, Fabric Data Factory doesn't give you a mechanism to make the TableName visible if you're doing it using a ForEach activity.
Instead of using a Script activity inside ForEach, why don't you invoke a parameterised pipeline, that takes the TableName as an input parameter? The child pipeline can have the script that you're already using in your pipeline. This will give you the right monitoring visibility that you expect for each table.
Check out the April 2026 Fabric update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 7 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 23 | |
| 17 | |
| 10 | |
| 9 | |
| 6 |