pbj
pbj

Reputation: 719

Save json to ADLS Gen2 using the Azure Synapse Copy Activity with content type application json

I'm using Azure Synapse REST api source in copy activity and trying to save api response as json with content-type as application/json in a azure data lake gen2 storage container. After saving the json documents I see the content-type set to application/octet-stream. How do I save the content-type as application/json?

enter image description here

Upvotes: 2

Views: 555

Answers (1)

Saideep Arikontham
Saideep Arikontham

Reputation: 6114

  • One way you can achieve this requirement is by using Azure data lake storage Rest API. Refer to this Microsoft document where you can see the rest API and how you can authorize to access the Rest API.
  • You can use web activity to Call the required REST API with authentication and try to set the required content type.
  • Another approach would be to use Azure logic apps to create the file with required content and content-type.
  • Let's say you have used copy data activity to write the response to a JSON file (op.json) where content-type is application/octet-stream. Now, using the flow as shown in the below image:

enter image description here

  • The final result would be a JSON as shown below:

enter image description here

Upvotes: 1

Related Questions