Log failed rows in Azure Data Factory Copy Activity

Puneeth Umesh Bharadwaj 2 Reputation points
2023-03-15T09:48:38.1966667+00:00

Hi,

I am trying to import data from a CSV file in Azure Blob Storage into a SQL Server Table. Whenever there is incompatible data, the activity fails. We wanted to log those rows into a file.

Source - CSV from Blob

Sink - SQL Server Table. Imports data using Table Type and Stored Procedure.

Please find our setup below. We expected the incompatible rows to be logged. However, the Copy Activity does not provide that information. Could you please help?

User's image

User's image

User's image

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2023-03-16T15:59:02.9033333+00:00

    Hi PB,

    Thank you for posting query in Microsoft Q&A Platform.

    I tried same at my end its working fine not failing. Please note, this will work only in case if you have incompatible rows. For other kind of issues, your copy activity still fails. For example, If you have string value(which cannot be converted to int) in source and trying to insert in to Int column at sink side, then it comes under incompatible row and it will skip it and proceed with other rows. So Are you sure your source has incompatible rows? or other kind of issues? It would be great if you can share error details if above helps.

    Please check below screenshots of my repro.

    User's image

    Hope this helps. If not, as requested, please share your error details and sample source and sink details.


    Please consider hitting Accept Answer button. Accepted answers help community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.