Copy Activity intermittently copying first row only?

Mats Elmsater 1 Reputation point
2021-11-17T18:09:51.617+00:00

We just noticed that some of our Copy Activities have been copying one row of data for a few days, although the JSON file source contains multiple rows.
When we went back and re-ran the pipeline today the Copy Activity copied all records as expected.

On the instances where only the first row was copied, we received no errors and Rows Read was the same as Rows Written (both 1)
Our source is a Data Lake JSON file with format: Set of Objects
Our sink is a Azure SQL Database table

Has anyone experienced anything similar?

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

3 answers

Sort by: Most helpful
  1. GNSAMPAIO 26 Reputation points
    2022-06-23T06:59:37.617+00:00

    I think I solved the issue.

    On Mapping, default array structure was (in my case) $['DetailedRecords'][0][TYPE] --> [TYPE] being TYPE the column name.
    [0] is taking only first index.

    I am mapping
    Collection reference > $['DetailedRecords']
    I tried mapping [TYPE] --> [TYPE] and it is working now

    5 people found this answer helpful.

  2. Denisa Pasha 25 Reputation points
    2023-06-29T11:50:07.57+00:00

    There's a trick to this. You import schemas, then you put the name of the array in collection reference then you import schemas again then it works

    5 people found this answer helpful.
    0 comments No comments

  3. Souilem, Mahdi 1 Reputation point
    2022-05-06T15:02:55.637+00:00

    Hi, i want to know if this problem is solved,
    i m facing the same issue, i m making two copy activities, one from a REST API and the second from a JSON file, both of them are returning only the first row in my sql database,
    i tried to copy this in a JSON file instead of sql database and it worked perfectly, it returned all the rows,
    i m wondering why in sql database it s returning just the first row,
    anyone have an idea about this issue?
    thanks


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.