Forum Discussion
SalCag
Jun 29, 2024Copper Contributor
Dynamic JSON for Web activity
Hi all I'm new to ADF. I want to create a pipeline that executes a stored procedure from an Azure SQL database and sends an email with the result from the SP. I followed these instructions t...
SalCag
Jun 30, 2024Copper Contributor
OK, I was able to go one step further.
I wrote a stored procedure to generate the JSON body from the output of the first SP.
Now, I can invoke the Logic App, but the body JSON arrives in a strange format:
{
"": "{\r\n\t\"message\":\"Mail body text\",\r\n\t\"receiver\":\"email address removed for privacy reasons\"\r\n\t}"
}
I narrowed down the issue to the fact that the SP returns a set (SELECT <result>), and I have to consume this result.
I used the approach described here: How to process output from stored procedure in Azure Data Factory - Microsoft Q&A
And it looks like the result looks like that because I use this approach.
The output of the Lookup Activity already has all these "special characters.":
{
"firstRow": {
"": "{\"message\":\"Mail Body text\",\"receiver\":\"email address removed for privacy reasons\"}"
},
"effect ... <truncated>
This is the source of the issue.
I already tried to use nested replace calls to get rid of this stuff, but without success.
Any hints on this?