Share via

duplicate rows - alter row issue

arkiboys 9,711 Reputation points
2022-05-31T20:29:03.073+00:00

Hi,
I am using delta parquet files.
My dataflow seems to be doing just insert and not update.
Any suggestions?

As you see in screen-shot I am using alter row as well as sink delta with keys.

alterRow2 is set to updateIf --> true()
sinkUpdate is set to Allow Update
list of columns added in each drop down

alterRow1 is set to insertIf --> true()
sinkInsert is set to Allow Insert
list of columns added in each drop down

I have the following in both derivedcolumns:
LookupSourceKey
LookupTargetKey
sha1(toString(Quantity_DC)+toString(Receiving_plant)+toString(Material)+toString(Plant)+toString(Batch)+toString(Posting_Date))

Let me know if you would like me to send you any more screen-shots.

Thank you

Azure Data Factory
Azure Data Factory

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

0 comments No comments

Answer accepted by question author

HimanshuSinha 19,637 Reputation points Microsoft Employee Moderator
2022-06-02T22:32:25.533+00:00

Hello @arkiboys ,
Thanks for the question and using MS Q&A platform.
As we understand the ask here is why you are only seeing INSERT and not UPDATE , please do let us know if its not accurate.
I did tried out the a simple transformation to test my theory . The INSERT and UPDATE needs attention .
What I did After the Exist activity I added derieved column and added an a Operation column . The idea is if you are using EXIST that means the record exists and UPDATE and NOT exists means INSERT .

207963-image.png
After this derived column we have the ALTER roq and I used the below expression
For UPDATE :
Update if -->iif(Operation == 'Update',true(),false())
For INSERT : iif(Operation == 'Insert',true(),false())

208053-image.png

It worked for me and I was able to get both INSERT and UPDATe work on my side .

Please do let me if you have any queries.
Thanks
Himanshu


  • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
  • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.