Andy T
Andy T

Reputation: 1377

Azure Data Factory Dynamic Content with base64 Conversion

I am making a HTTP Triggered Azure Function Call from Azure Data Factory. I am not able to make the HTTP body of the function activity correct for HTTP POST. This is the HTTP body

{ "filename": "@{item().BatchId}.json", "filecontent": @{base64(item().BatchId)} }

I am passing two things: filename and filecontent, which needs to be base64 encoded before sending it to the function. base64 function is NOT working with the dynamic value of BatchId but the filename is working fine in the above example.

Upvotes: 1

Views: 2693

Answers (1)

Andy T
Andy T

Reputation: 1377

It was not working because the BatchId was not a string. Following line started working -

{ "filename": "@{item().BatchId}.json", containername:"insightsfiles", "filecontent": "@{base64(string(item().BatchId)) }"}

Upvotes: 1

Related Questions