Share via

Data Factory Copy Data function dropping records

Mark Eckert 11 Reputation points
2022-06-17T14:26:13.19+00:00

I have set up a copy data pipeline in Azure DataFactory. The table I'm copying from contains 1500 records. The copy data step only read 872 records. I've tried to find records in the input table that seem to have bad data but nothing seems to be excessive long text or the wrong data type. I also looked for duplicate keys but I don't find any fields in the input record layout that indicate they are a key. Does anyone have suggestions as to what I should look for or try to change to resolve the issue?

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


3 answers

Sort by: Most helpful
  1. 81972119 6 Reputation points
    2022-10-17T22:15:35.95+00:00

    I'm having the same issue.

    My source is a parquet file and my sink is a stored procedure with user defined table type.

    I have fault tolerance and logging enabled, when I run the pipeline in debug the copy data activity reports:

    "rowsRead": 53303,  
    "rowsCopied": 53303,  
    "rowsSkipped": 0  
    

    I have a simple truncate and insert (from the UDTT) in the procedure to debug the issue but I'm only seeing 4953 rows returned from the UDTT, it looks like they are the last 4953 in the file.

    I have tried altering the data types in the UDTT but no difference, if I set up an alternat copy data activity to insert the data as a new table I get the complete file.

    We are using SQL procedures as a sink as the processing of the file (bulk\Net etc) is based on other parameters.

    Any help would be appreciated.

    Was this answer helpful?

    0 comments No comments

  2. Mark Eckert 11 Reputation points
    2022-07-08T18:39:29+00:00

    No I didn't enable skip incompatible rows. The problem seems completely random. Each time I run the Copy Data step I can't be sure what the result will be. Sometimes it copies all of the records and if I run it again a minute later it doesn't copy all of the records. There isn't any error message. Does anyone have a suggestion?

    Was this answer helpful?

    0 comments No comments

  3. MartinJaffer-MSFT 26,161 Reputation points
    2022-06-17T18:23:39.887+00:00

    Hello @Mark Eckert and welcome to Microsoft Q&A.

    So it sounds like you are missing expected rows. In the Copy Activity settings, did you be chance enable "Skip Incompatible rows" ? See below screenshot.

    212530-image.png

    The Logging options allow the incompatible rows to be written to a file of your choice.

    Was this answer helpful?

    0 comments No comments

Your answer

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