custom failing a dataflow & custom error messages

saikumar ellendula 6 Reputation points

[Enter feedback here]

In azure data factory,

we have a scenario of failing the dataflow if there are zero records in a file.
using the aggregate transformation, we are able to derive the number of records in the file,but we done see a way to fail the dataflow like using functions like abort() etc.,

also, we would like show failure reason with custom error message like " file has zero records" in the above case.
kindly provide a way to achieve this in azure data factory

Thanks & Regards,

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
6,305 questions
No comments
1 vote

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 33,136 Reputation points Microsoft Employee

    Hi @saikumarellendula-8111,

    Thank for reaching out. AFAIK there is no such out of box feature for custom failing a dataflow and writing error message.

    A possible way you could try is by using a validation activity to check the file size > 0 before executing your data flow activity. If the validation is true then execute dataflow activity, and if validation is false then you can send an email by triggering a logic app from ADF as explained in this blog : Send Notifications from an Azure Data Factory Pipeline

    If you have a feature request suggestion related to this requirement, please feel free to share it in ADF user voice forum:

    Hope this info helps.

    Thank you

    Please do consider to click on "Accept Answer" and "Upvote" on the post that helps you, as it can be beneficial to other community members.