question

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

data flow - Delete If condition

Hello,
For awhile now I have been trying to get this to work but no success...
My source is a view on prem sql server, say vw_Department
The data flow has source, alter row with upsert if set to true() and the sink Delta parquet has Allow upsert set to true
The keyColumn is also set for the sink, i.e. DepartmentID (However, this is dynamically retrieved, split($dfpKeyColumn, ',')
Anyway, the upsert if seems to be working fine because if I edit the source table, i.e. update a row or insert a row iinto the table, then the Sink parquet Delta reflects those changes...
Then I try to allow for if a row is deleted at source, i.e. a row is removed from the table in source on-prem sql server.
So I add the Delete If and Allow Delete accordingly...
When a row is removed from the source, then in Sink, still I see all the rows including the deleted ones. Whereas I should only see the upsert or unchanged ones.
I know I have to place a condition for the Deleted If but not sure what to put for it to make this delete work fine.
Noe that I can not put a condition like "Name" == "test" because I want to remove the row from Sink if it is deleted at source.
I placed the upsert If after the Delete If and even changed their priority other way round but still not solved the issue yet
Any thoughts?

Thank you

azure-synapse-analytics
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

Hi @arkiboys ,

Thank you for posting query on Microsoft Q&A Platform. Similar issue I answered in below link with detailed explanation. Could you please have a look on it and see if that helps.

https://docs.microsoft.com/en-us/answers/questions/578219/data-flow-34delete-if34-setting-in-alter-row.html?childToView=579550#answer-579550

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.