(Glue-2408) Data Replication with Delta Type Trigger

In addition to the standard SAP table data replication, you can replicate data with delta type trigger.

Below, you can find a step-by-step manual on how to set up and execute the extraction of data using the trigger delta type.

  1. Perform steps to create Glue table, SAP Table Fetcher, Glue table consumer and Extraction Process in step list SAP Table Data Replication. Activation of created objects is not yet necessary.

  2. Open created SAP Table Fetcher. If Fetcher is active, deactivate it using button in the toolbar at the top of the screen.

  3. Switch to edit mode using button in the same toolbar and change Delta type to TRIGGER.

  4. Activate the fetcher.

  5. Click on manage trigger. In the trigger screen you can see 3 triggers in deactivated status and Shadow table used to capture delta.

    image-20240814-131912.png

    You can activate triggers directly in Manage Trigger screen. However it is recommended to use delta initialization.

  6. Open created Glue Table. If Table is active deactivate it and switch to edit mode.

  7. Switch to fields tab and click on Add fields in toolbar.

  8. Select only deletion flag and confirm.

  9. Deletion flag is now added to table fields which value is set to 'D' if trigger catches DELETE operation.

    image-20240815-090551.png

  10. Activate all related objects (Glue Table, SAP Table Fetcher, Glue Table Consumer, Extraction Process).

  11. Go to extraction process. If it is deactivated, activate it and click Execute in the toolbar at the top of the screen.

  12. Choose Load Type either Delta Init + Full load or Delta Init without data based on the fact, if you want to transfer all data prior to delta initialization or not.

  13. Execute extraction using button in toolbar at the top of the screen.

  14. After extraction is successfully executed, go back to the fetcher and open Manage Trigger screen.

  15. Now you can see that all triggers are “green” which means they were successfully deployed.

  16. Perform some operations/changes on source table.

  17. You can check in Manage Trigger screen if your changes were captured.

    Shadow table content with captured change:

  18. Go to extraction process and click Execute.

  19. Select Delta Load as Load type and execute.

  20. You can see that changed captured in shadow table were processed.

Case of using Views for Trigger delta

In case of using views in triggers there is a need to specify on which Table Triggers are deployed. New field is shown called “Trigger table name” where you can specify it. In this example seen on the picture bellow you can see that view we use is “ODQDATA_V”. In Trigger table name we specified a table on which trigger are deployed, in this case “ODQDATA“.