Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
I am working with Microsoft Fabric Data Pipelines and need to implement a failure-handling mechanism.
I appreciate any guidance, best practices, or alternative approaches!
Solved! Go to Solution.
Hello @bhavya5903
Use individual `Set Variable` activities on each activity’s `Upon Failure` path to collect error details:
• `@activity('ActivityName').Error.message` (ErrorMessage)
• `@activity('ActivityName').Error.errorCode` (ErrorCode)
• `@activity('ActivityName').name` (FailedActivityName)
• `@pipeline().Pipeline` (PipelineName)
Add an Execute Pipeline activity on the `Upon Failure` path of the main pipeline. Pass the `errorDetails` array as a parameter to `FailureHandlerPipeline`.
Do something like this in notebook and invoke it in child pipeline
from pyspark.sql import functions as F
error_df = spark.createDataFrame(error_batch)
error_df.write.mode("append").saveAsTable("error_logs")
Hope this helps.
Thanks
Hello @bhavya5903
Use individual `Set Variable` activities on each activity’s `Upon Failure` path to collect error details:
• `@activity('ActivityName').Error.message` (ErrorMessage)
• `@activity('ActivityName').Error.errorCode` (ErrorCode)
• `@activity('ActivityName').name` (FailedActivityName)
• `@pipeline().Pipeline` (PipelineName)
Add an Execute Pipeline activity on the `Upon Failure` path of the main pipeline. Pass the `errorDetails` array as a parameter to `FailureHandlerPipeline`.
Do something like this in notebook and invoke it in child pipeline
from pyspark.sql import functions as F
error_df = spark.createDataFrame(error_batch)
error_df.write.mode("append").saveAsTable("error_logs")
Hope this helps.
Thanks
Hi @bhavya5903 ,
Has the response from @nilendraFabric resolved your issue?
If it did, please consider marking the helpful reply as the accepted solution—this helps other community members with similar questions find answers more easily.
Thank you for being a valued member of the Microsoft Fabric Community Forum!
Hi @bhavya5903 ,
The answer posted by @nilendraFabric has resolved the issue? If yes, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from the thread.
Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!
Hi @bhavya5903 ,
Has the response from @nilendraFabric resolved your issue?
If it did, please consider marking the helpful reply as the accepted solution—this helps other community members with similar questions find answers more easily.
Thank you for being a valued member of the Microsoft Fabric Community Forum!
User | Count |
---|---|
27 | |
14 | |
10 | |
10 | |
4 |
User | Count |
---|---|
27 | |
27 | |
19 | |
18 | |
6 |