Did you know Azure Data Factory (ADF) will actually list available properties? It will. One of the things I cover in my ADF training titled Master the Fundamentals of Azure Data Factory is this handy troubleshooting tip.
I am attempting to read the status of a pipeline execution using a call to the ADF REST API. This post is applicable to lots of activities; I simply wanted to describe the use case.
That said, imagine you are channeling Bob Ross by adding a happy little ADF expression while developing an ADF pipeline, something like “@activity(‘Get Pipeline Run Details’).output.value”:
You decide to click Debug to test-execute the pipeline and your happy little ADF expression throws a big fat error:
“Bad request! Bad!” The Details are helpful once you have experience decoding ADF error messages</IamWhining1>. Until that time, you have blog posts and articles to help – like this one.</IamHereToHelp>
1 ADF error messages are better than the error messages we had2.
2 Paraphrased lyrics…
Wouldn’t It Be Nice to Know Which Properties Are Available?
Yes. Yes, it would. Here’s one way to get ADF to tell you which properties are available for the “@activity(‘Get Pipeline Run Details’).output” expression.
First, I use a random combination of characters to make up a property name, such as “Kwyjibo”.
After the expression for the “output” of the “Get Pipeline Run Details” activity, I enclose the word “Kwyjibo” in single-quotes3, and then enclose that value in square brackets”:
3 Double-quotes are right out4.
If, regarding my use of the invented property named “Kwyjibo,” you are thinking something along the lines of: “You keep using that word. I do not think it means what you think it means.4” You may be correct. Let’s continue.
4 Movie paraphrases.
A test execution surfaces an error at the same activity as before, but this time the Error details are enlightening:
Attempting to read the “Kwyjibo” property raised a new – and much better, in my humble opinion – error details message:
The expression ‘activity(‘Get Pipeline Run Details’).output[‘Kwyjibo’]’ cannot be evaluated because property ‘Kwyjibo’ doesn’t exist, available properties are ‘id, runId, debugRunId, runGroupId, pipelineName, parameters, invokedBy, runStart, runEnd, durationInMs, status, message, pipelineReturnValue, lastUpdated, annotations, runDimension, isLatest, ADFWebActivityResponseHeaders, effectiveIntegrationRuntime, executionDuration, durationInQueue, billingReference‘. (bold italics mine)
Dear Azure Data Factory,
That’s quite a list of available properties. Thank you!