Forum Discussion
Error Handling in Dataflow Pipelines
- 1 year ago
Hi hameed4ru,
Thank you for reaching out to the Microsoft Fabric Community.
You're on the right track by routing failed dataflows to a central notebook for error reporting and notifications. However, the issue you're facing is likely due to the use of mssparkutils.pipeline.getActivityOutput(), which only returns output for successful activities. This behavior is confirmed in Microsoft’s documentation here:
Microsoft Spark Utilities (MSSparkUtils) for Fabric - Microsoft Fabric | Microsoft LearnTo make your solution more reliable, we recommend passing the failure context (e.g., dataflow name and error message) directly to the notebook via pipeline parameters when a dataflow fails. These can then be retrieved using mssparkutils.pipeline.getInputParameters() inside the notebook.
For your reference, I am also including the link that has already been accepted by the community.Please have a look for better understandingSolved: Is it possible to pass parameter from notebook act... - Microsoft Fabric Community
Parameters - Microsoft Fabric | Microsoft Learn
Additionally, ensure your Outlook activity is configured to handle HTML content correctly to avoid formatting issues during email delivery.
We suggest replacing the output polling logic with parameter passing through failure branches. It’s simpler, more reliable, and fully supported within Fabric’s orchestration framework.
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you,
Sahasra - 1 year ago
Hi hameed4ru,
We wanted to follow up to see if our suggestion was helpful. Please let us know how things are progressing and if you are still encountering any issues.
If the response resolved your problem, you may mark it as the solution and give it a thumbs up to assist others in the community as well.
Thank you.
Hi Team,
I did a workaround to achieve this in the MailBody, where I used the combination of htmlCode to create a html-table. I configured the outlook html table to show the status of each and every dataflow as follows.
@activity('dataflow-1').status to check whether the status is success or failed.
Yes, your multiple blogs which you have provided has helped me to resolve the issue.
Thanks,
Hameed
- v-sgandrathi1 year agoCommunity Support
Hi hameed4ru,
Thank you for sharing your update. It's good to know that combining htmlCode with @activity('dataflow-name').status helped you create a clean and functional HTML table in the email body.
I'm glad the resources shared earlier were useful in resolving your issue. Thanks for sharing your solution, as it will be helpful for others facing similar challenges.
Thank you and continue using Microsoft Fabric Community Forum!