(Glue-2105) Merge - using captured deleted entries
When using the deletion flag to capture entries that have been removed, some storages can utilize the merge functionality. Currently supported storages:
MS SQL
Snowflake
The merge functionality fetches the data and decides if the entries should be deleted or inserted/updated based on the deletion flag of the row.
The content of the shadow table used for the trigger load with the merge operation
The merge logic removes entries from the storage marked as “DELETE” and inserts/updates entries marked as “UPDATE” or “INSERT”. Based on values in the “TYPE” column the target deletion flag field contains the value “D” or ““ (space) during the load. If the source table is DSO or some structure, where this delta logic is already handled, the user doesn’t have to set up the “Capturing of deleted entries”.
1. Capture deleted entries
The merge functionality uses the deletion flag field name to decide which entries should be deleted or inserted/updated. The setup is described in the scenario Capturing of deleted entries.
This step is required only if there is no deletion field in the source structure. For example, DSOs have RECORDMODE in their structure by default. In this case, there is not required to create an additional field, only set it as “Delete field” in the extraction process and in the consumer settings.
2. Consumer setup
When doing the merge setup, the GLUE table should already contain a deletion field (using trigger delta or default SAP field).
Extraction Process - GLDELFLAG marked as “Delete flag”
The consumer needs to have information about the deletion field. This setting can be applied while editing the consumer in the “/DVD/GL80“ transaction. Additional information is available on the Glue Table Consumer page.