Start by defining the source entity and use the Action button to remove all columns that are NOT part of the primary key.

Select only key columns from the source entity

Next define the target entity.  In this example, I used a SQL statement as the source entity, selecting the primary key column and filtering out previously deleted rows.

Select key columns from non-deleted rows in the target

Then Add a Minus Operator and Map the Source and Target to it.  Select the Right Minus.

Use the Right Minus Operator, with target as the Right Entity

Next, create an expression to add a constant ‘Y’ for the deleted rows.

Add and expression to create constant 'Y' to mark the deleted row in the target

Define the Target table with an integration strategy of ‘Merge’.

Define Target enity with Merge Integration strategy

And finally, map the source and expression attributes to the corresponding attributes in the target table.

Map the source and expression columns to the target columns

Don’t forget to save the data flow! 

Validate and Save the dataflow

 

Now you can create and publish an integration task for this dataflow and test.  Hope this is useful!