question

arkiboys avatar image
0 Votes"
arkiboys asked ShaikMaheer-MSFT edited

Alter row --> Delete If priority1, upsert If priority2

Hello,
I am trying to allow for the delete to work alongside the upsert but the delete does not seem to work.
As you can see in the screenshots, I have added an extra column (Deleted) in the derived activity so that all rows are set to 0
Then I would like the row which is deleted at source to be set to 1 for the Deleted Column (I have an expression in Alter row for "Deleted" == "1"
Can you please have a look at the screenshots and let me know how I can set the Deleted derived column to 1 for the rows that are detected to be missing in source?
Thank you

137938-image.png
137939-image.png
137964-image.png
137889-image.png
137940-image.png


azure-data-factory
image.png (51.9 KiB)
image.png (48.7 KiB)
image.png (41.4 KiB)
image.png (51.2 KiB)
image.png (54.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ShaikMaheer-MSFT avatar image
0 Votes"
ShaikMaheer-MSFT answered ShaikMaheer-MSFT edited

Hi @arkiboys ,

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

Could you please refer answer provided by me in below link which explains how to delete data from Sink when source is not having that IDs.

https://docs.microsoft.com/en-us/answers/questions/578219/index.html

On top of above implementation, add another source with your source data and continue your upsert logic by adding alter row transformation on this new branch.

Please check below link where similar issue answered.
https://docs.microsoft.com/en-us/answers/questions/578806/index.html

Hope this will help. Please let us know if any further queries.


  • 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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.