I am trying to read a zip file from Azure blob using a web activity and then again doing put activity to to post the same back to azure blob (my end goal is to send it to some external site but that is also failing with same file corruption error)
Pipeline_image
Get blob configurations are as shown in this image. get_config
Put Configurations: PUT config
As shown in the above image my request body is: @activity('get_blob').output.response
Response is as below:
{
"Response": "<Binary_stream>",
"ADFWebActivityResponseHeaders": {
"x-ms-request-id": "27ced9aa-701e-006d-77eb-9ee3a1000000",
"x-ms-version": "2020-04-08",
"x-ms-creation-time": "Thu, 27 Mar 2025 07:13:09 GMT",
"x-ms-lease-status": "unlocked",
"x-ms-lease-state": "available",
"x-ms-blob-type": "BlockBlob",
"x-ms-server-encrypted": "true",
"Access-Control-Expose-Headers": "x-ms-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding",
"Access-Control-Allow-Origin": "*",
"Accept-Ranges": "bytes",
"Date": "Thu, 27 Mar 2025 07:42:56 GMT",
"ETag": "\"0x8DD6CFED46654AC\"",
"Server": "Windows-Azure-Blob/1.0;Microsoft-HTTPAPI/2.0",
"Content-Length": "493",
"Content-MD5": "7KOvIt5Heg7fDu0C1PxUhQ==",
"Content-Type": "application/x-zip-compressed",
"Last-Modified": "Thu, 27 Mar 2025 07:13:09 GMT"
},
"effectiveIntegrationRuntime": "AutoResolveIntegrationRuntime (Central US)",
"executionDuration": 0,
"durationInQueue": {
"integrationRuntimeQueue": 2
}
}
This pipeline executes very well but when I try to download the written file and unzip it it gives me error.
An attempt was made to move the file pointer before the beginning of the file.
unzip_error
I am not sure if I am missing any header at the source or destination but this doesn't even seems to be working.
I have already tried with different request headers at PUT with no success.
"Content-Type" = "application/x-zip-compressed"
Please help me to solve this.
I am trying to read a zip file from Azure blob using a web activity and then again doing put activity to to post the same back to azure blob (my end goal is to send it to some external site but that is also failing with same file corruption error)
Pipeline_image
Get blob configurations are as shown in this image. get_config
Put Configurations: PUT config
As shown in the above image my request body is: @activity('get_blob').output.response
Response is as below:
{
"Response": "<Binary_stream>",
"ADFWebActivityResponseHeaders": {
"x-ms-request-id": "27ced9aa-701e-006d-77eb-9ee3a1000000",
"x-ms-version": "2020-04-08",
"x-ms-creation-time": "Thu, 27 Mar 2025 07:13:09 GMT",
"x-ms-lease-status": "unlocked",
"x-ms-lease-state": "available",
"x-ms-blob-type": "BlockBlob",
"x-ms-server-encrypted": "true",
"Access-Control-Expose-Headers": "x-ms-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding",
"Access-Control-Allow-Origin": "*",
"Accept-Ranges": "bytes",
"Date": "Thu, 27 Mar 2025 07:42:56 GMT",
"ETag": "\"0x8DD6CFED46654AC\"",
"Server": "Windows-Azure-Blob/1.0;Microsoft-HTTPAPI/2.0",
"Content-Length": "493",
"Content-MD5": "7KOvIt5Heg7fDu0C1PxUhQ==",
"Content-Type": "application/x-zip-compressed",
"Last-Modified": "Thu, 27 Mar 2025 07:13:09 GMT"
},
"effectiveIntegrationRuntime": "AutoResolveIntegrationRuntime (Central US)",
"executionDuration": 0,
"durationInQueue": {
"integrationRuntimeQueue": 2
}
}
This pipeline executes very well but when I try to download the written file and unzip it it gives me error.
An attempt was made to move the file pointer before the beginning of the file.
unzip_error
I am not sure if I am missing any header at the source or destination but this doesn't even seems to be working.
I have already tried with different request headers at PUT with no success.
"Content-Type" = "application/x-zip-compressed"
Please help me to solve this.
Share Improve this question asked Mar 27 at 9:12 Manju BasavantapuraManju Basavantapura 32 bronze badges 4- Can you cross check whether are you adding any binary data in between? – Rakesh Govindula Commented Mar 27 at 9:46
- I don't think I am, as shown in the snips it is straight get and put no operations in between still this isn't working – Manju Basavantapura Commented Mar 27 at 16:50
- Is there any limitation that you have with Copy activity? – Rakesh Govindula Commented Mar 27 at 17:49
- as I told the objective is to send the zip file to external web hook which doesn't have any connector or DS in side copy activity. I am just using this pipeline as an example to show this doesn't work. If there is way to use REST as sink and BINARY as source in Copy activity that would also work but, I don't think even that is supported – Manju Basavantapura Commented Mar 28 at 4:30
1 Answer
Reset to default 0I have tried the above scenario with several changes in the headers, but I got the same results when opening the zip file after downloading.
As per this MS Q&A response by @MartinJaffer-MSFT,
The web activity might be giving the corrupt binary data. It might not be a good idea as it seems to be giving string interim data type.
I had tried write to a new file File2.zip
and here you can see the source and target size is not the same which is confirming the above statement.
You have mentioned that you need to send this zip file to some external site. As ADF currently does not support the HTTP dataset as sink in the copy activity, using any programming logic in Databricks, Azure functions might be the possible workarounds here. You can also try Custom activity with Batch accounts.