question

saikumarellendula-8111 avatar image
1 Vote"
saikumarellendula-8111 asked ·

custom failing a dataflow & custom error messages

[Enter feedback here]
Hi,

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,
Saikumar

azure-data-factory
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KranthiPakala-MSFT avatar image
0 Votes"
KranthiPakala-MSFT answered ·

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: https://feedback.azure.com/forums/270578-data-factory/


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.


· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

it would not be user/developer friendly to create logic app and send mail in this case instead of just showing "failed because of zero records"

0 Votes 0 ·

Hi @saikumarellendula-8111,

Thanks for your response. I agree with your point, but the above suggestion is just an alternate/workaround. Another option could be, after validating the file size, have a Custom activity or Function Activity and write your own logic to display custom error message. ADF engineering team is actively working on enhancements and new features to improve the product better.

I would recommend you to please up-vote and/or comment on below existing feedback to increase the priority of feature request.


ADF feature request: Throw Error Activity


Hope this info helps.



Thank you

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





0 Votes 0 ·