Search code examples
azure-data-factory

Azure Data Factory Failing with Bulk Load


I am trying to extract data from a Azure SQL Database, however I'm getting the

Operation on target Copy Table to EnrDB failed: Failure happened on 'Source' side. ErrorCode=SqlOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed with the following error: 'Cannot bulk load because the file "https://xxxxxxx.dfs.core.windows.net/dataverse-xxxxx-org5a2bcccf/appointment/2022-03.csv" could not be opened. Operating system error code 12(The access code is invalid.).

You might be thinking this is permission issue, but if you take a look at the error code 12 you will see the issue is related to Bulk Load.. a related answer can be found here..

https://learn.microsoft.com/en-us/answers/questions/988935/cannot-bulk-load-file-error-code-12-azure-synapse.html

I thought I might be able to fix the issue by selecting Bulk lock see image.

enter image description here

But I still get the error.

Any thoughts on how to resolve this issue?


Solution

  • As I see that the error is refering to a source side (2022-03.csv) , so I am not sure as to why are you making changes on the sink side . As explained in the threads which you referd , it appears the the CSV file is getting updated once the you pipeline starts execute by some other process . Refering back to the same thread .https://learn.microsoft.com/en-us/answers/questions/988935/cannot-bulk-load-file-error-code-12-azure-synapse.html The changes suggested below should be made on the pipeline/process which is writing to 2022-03.csv .

    enter image description here