@Santhi Dhanuskodi Thanks for posting your query on Microsoft Q&A.
You mentioned that you have an XML file in blob container in Azure Storage account. To allow Azure Data Factory to have write permission to your chosen container,
create a shared access token first:
- Go to your Storage Account.
- Click on “Containers” under Data Storage.
- Select your container.
- Click “Shared access tokens” under Settings.
- Grant the required permissions: Read, Add, Create, and Write.
- Set an appropriate expiry date.
- Click “Generate SAS token and URL” and copy the Blob SAS URL at the bottom.
Set Up the Web Activity:
- Create a new Web activity (e.g., name it “Save Output to Blob”).
- Link it to your source activity (e.g., the one reading the XML file).
- Open the properties for the newly created Web Activity and select the Settings tab.
- Set the URL to be your previously copied Blob SAS URL, adding the desired blob file name after the container name in the URL.
Passing XML Content to Web Activity:
- The output from your lookup activity will be in JSON format. To convert it to XML, use the following expression:
@string(xml(json(string(activity('Lookup1').output.value))))
Sample example here: https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions#xml - You can either store this as a string in a variable or directly use it dynamically in the web activity payload.
Refer to this Stack overflow post: https://stackoverflow.com/questions/70983285/reading-and-writing-an-xml-file-using-adf-lookup-activity
If you have any questions, let me know via comments.