(Glue-2011) Selective Deletion
Transaction:
/DVD/GL_SEL_DEL
This functionality enables you to delete data, that you have selected in Glue Data Browser through the transaction /DVD/GL_SEL_DEL. The procedure for the selection of data is the same as described in (Glue-2011) Data Browser documentation.
Requirements
Soft selective deletion
Soft selective deletion is a functionality that is available for the Transparent Binary storage or Hadoop storages which use Hive or Impala. The functionality is accessible through the transaction /DVD/GL_SEL_DEL. Data that should be deleted is selected the same way as in Data Browser, for more information see the (Glue-2011) Data Browser chapter.
An administrator should assign this transaction only to relevant users.
For Hive and Impala storages, you must specify a hint: "UseNativeQuery=1;" in storage settings.
Prerequisites for soft selective deletion
- fields GLREQUEST (Request) and DVD_DELETION_INDICATOR (of type XFELD) are included in the table structure.
To execute soft selective deletion follow these steps:
- Go to /DVD/GL_SEL_DEL
- Enter a table name
- Enter deletion criteria in select-options
- Click Program > Soft Sel. Deletion
- Schedule the program to execute the Soft selective deletion
The deletion process can be monitored through the transaction SM37. Once the deletion ends successfully, the following can be observed on the particular table:
- Program copied everything from the specified table that complies with select-options criteria under a new Glue Request.
- Program also sets X in the field DVD_DELETION_INDICATOR.
The table content after specified select-options and executed soft deletion can look the following way:
We can see in the figure that the five entries with the Glue Request 71.983 were copied into the same table under the new Glue Request 71.988. These new entries also have the field 'DVD_DELETION_INDICATOR' set to 'X'. The "X" indicates that these entries were deleted in SAP. The request with the greater number (in this case Glue Request 71.988 ) contains the current information about the record.
Soft selective deletion doesn't manipulate data that is already in Hadoop - instead, it copies corresponding data with adjusted values GLREQUEST and DVD_DELETION_INDICATOR.
Hard selective deletion
Hard selective deletion is also available for Transparent Binary storage or Hadoop storages, which use SQL execution engines. Run the deletion with the same transaction /DVD/GL_SEL_DEL.
We recommend using partitioning carefully, as it can improve performance. It is only necessary to access affected partitions.
The procedure to execute hard selective deletion is similar to soft selective deletion:
- Go to the transaction /DVD/GL_SEL_DEL
- Enter a table name
- Enter deletion criteria in select-options
- Click Program > Hard Sel. Deletion
- Schedule the program to execute the Hard selective deletion
The deletion process can be monitored through the transaction SM37. Once the deletion process ends successfully, the following can be observed in the table:
- Program deleted everything from the specified table that complies with the select-options criteria
The hard selective deletion manipulates data that is present on Hadoop. It physically deletes entries that comply with the select-options. This process is irreversible, which means deleted data can't be recovered.
If you try to find the data the following message appears:
Selective deletion synchronization between Standard DSO/InfoCube and Glue
Selective deletion synchronization report /DVD/GL_DB_SYNC_SEL_DEL detects when a selective deletion operation has been performed on an InfoProvider (Standard DSO/InfoCube) or a DTP request has been deleted from InfoCube and executes a soft selective deletion on the Glue table with the same selection.
Parameters:
- Date range - data range for monitoring.
- Type of selective deletion - type of selective deletion you want to perform on a Glue table - hard or soft.
- Package size - package size to be used for reading from Glue table during hard and soft deletion, and inserting of records during soft deletion.
Once you execute the report (F8) it will display a pop-up window with background scheduling options:
In order to enable synchronization, open Table Maintenance (Transaction SM30) for the Glue table /DVD/GL_DB_SD_S and specify the following parameters:
- InfoProvider - technical name of Standard DSO or InfoCube which to be monitored.
- Table name - name of Glue table for which selective deletion to be scheduled.
- Enabled - flag indicating that synchronization between an InfoProvider and Glue table is enabled.
Once the report is scheduled, it will monitor if the selective deletion or InfoCube request deletion took place for the selected period and schedule selective deletion on the Glue table with the deletion condition accordingly.