Use an activity output as the step name to get additional info in ADF

48 Views Asked by At

I am trying to capture error data in Azure Data Factory. When an error occurs in any activity I want to capture error information and pass it into another pipeline to do processing and storage. For example I capture error message through this dynamic expression:

@activity('Log_Execution').Error.message

and the activity name through this:

@activity('Log_Execution').Error.target

I am trying to find a way to combine these two so that I can pass in the expression to get the Activity Name into the expression to get the Error Message:

@activity(activity('Log_Execution').Error.target).Error.message

Where the inside of the activity translates to 'Log_Execution'. However I get the error code: Only a single string literal argument is allowed inside the class clause.

I have tried setting the Activity Name from the Error.Target output in a set variable activity and then using it as the input of the variable like this @string(activity(variables('error_step')).Error.errorCode) but I get the same error.

Is there a way to get around this so that I can dynamically get error information using the Error.Target expression.

0

There are 0 best solutions below