Using Upsert/Alter row condition in azure data flow is not inserted all the records into the sink table

SrikanthK 1 Reputation point
2022-11-12T19:45:38.25+00:00
  1. Create a derived column "Flag" and updated with 'Y' or 'N'
  2. Created Filter records with expression Flag='N'
  3. Create Alter with upsert if "true()"
  4. In Sink setting selected upsert

After running the pipeline expected was 30 which was showing in debug also but only 28 records are inserted into sink table with 2 records lost

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,514 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. BhargavaGunnam-MSFT 25,891 Reputation points Microsoft Employee
    2022-11-14T23:49:24.15+00:00

    Hello @SrikanthK ,

    Welcome to the MS Q&A platform.

    Please correct me if my understanding is wrong. You could see 30 records on the sink data preview, but only 28 records were inserted in your sink table.

    Do you see all 30+ symbols on the left side in the sink data preview? If you see any '-', that means, the records will be deleted. (If you see 28 +, and 2- meaning, only 28 records will be inserted)

    260230-image.png

    Can you please check if there is any 'delete if' in your alterrow transformation?

    260257-image.png


  2. SrikanthK 1 Reputation point
    2022-11-28T06:44:24.593+00:00

    I see 30 + symbols only , will check again

    0 comments No comments