How to identify status of an activity in Azure data factory

Priya Jha 901 Reputation points
2021-07-12T13:26:21.82+00:00

Hi All,

I was following below architecture for removing duplicate activities to get the error message of every activity for logging purpose.
113932-108736-image.png

For logging error at every activity level i used the following code to concat error messages from every activity
@markus.bohland@hotmail.de (activity('Act_1').error?.message,'^|',activity('Act_2').error?.message,'^|',activity('Act_3').error?.message,'^|',activity('Act_4').error?.message)

But because we are using Skipped along with completion dependency, the upper concat expression fails with the following error when an activity is skipped:
The expression 'concat(activity('Act_2').error?.message)' cannot be evaluated because property 'error' cannot be selected.

Is there any way, i can get error messages for every activity in the above architecture?

Also is there any flag or way to identify whether an activity went through a skipped ,or completion case if all 2 flows are mapping to same output?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

Answer accepted by question author
  1. Nandan Hegde 36,716 Reputation points MVP Volunteer Moderator
    2021-07-12T13:38:55.32+00:00

    Hey,
    Since you have used Skipped logic, there would not be any output because of which you are getting the error.
    You can validate whether there is any output or not by using '?':
    activity('Act_2')?.error?.message

    My guess is there is no flag available based on my knowledge.

    @MartinJaffer-MSFT @KranthiPakala-MSFT @HimanshuSinha @Nasreen Akter : please correct me if I am wrong or any other thoughts on the same.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.