1
votes

I have a Data factory pipeline that copies data from one container to another (ADLS Gen 2 for both). I am using the Copy activity with the following settings:

Source settings & Sink settings

In the source the Content-Type is correctly set to application/json. However, when the data is copied to the sink, the Content-Type is changed to application/octet-stream. This causes some trouble when for instance reading the blob in a Logic App as it expects the type to be json. I do not find anywhere to send in the Content-Type in the Copy activity.

Any suggestions?

Edit:

As I am using a JSON dataset and copying between two blob containers (ADLS Gen 2), I do not seem to have the "preserve" option as you can see in this screenshot below: Settings for my dataset.

1
Please have a try this. Add "preserve": ["Attributes"] as MSDN shows. - Steve Zhao
I can't seem to find that setting? It seems that it is only available for binary format datasets? Mine is defined as a JSON dataset. - FinneVirta
It seems that there is no Preserve option in Setting. You can click {} button and directly add it to your script code. Maybe it can work. - Steve Zhao
Have the same issue was wondering if you found a solution to the problem? - gimp770
No I did not find any solution, I ended up using a Logic app for the task, and in there it is possible to set the Content-Type. - FinneVirta

1 Answers

0
votes

As suggested in the comment you can use preserve Attributes which is in the settings of the copy activity.

Preserve option in Settings