How can I programmatically retrieve error messages from each run of an azure synapse pipeline ? Obviously if this was a normal binary I could redirect stderr and/or stdout by executing the binary from a shell wrapper, however its not that simple here since this is auto launched daily based on a cloud based azure synapse pipeline trigger.
I have many pipelines and wish to achieve this without having to modify the underlying pipelines themselves ( but will if I must )
Any suggestions ? Yes synapse pipelines are a no-code solution however I need access to errors to drive my downstream processing
In the Azure SDK, under the Artifacts namespace, you can use the PipelineRunClient class to get information about the run.
Here is some code I use to capture the Status of a run, but it could be used for other properties as well.
The Client object in this case is a PipelineRunClient. run.Value is a PipelineRun object, which includes the following properties:
I have not tested it, but I assume if the Status is Failed, the Message property would contain the error message text.