Capturing Delta Changes in Your Local Table
Enable Delta Capture in your local table to automatically track all inserts, updates and deletions of its records via Change Date and Change Type columns. You can use replication flows, transformation flows, and transformation flows on file to write to these tables and to read from them, extracting only delta changes for each run.
Prerequisites
-
You table must have a status Not Deployed.
-
You must define one or more key columns.
Switching Delta Capture On
You enable Delta Capture while creating a local table. See Creating a Local Table.
-
Delta Capture Table field is added and a default name for the delta capture table is defined (Technical name + Delta).
-
2 additional columns are automatically created in my table:
Column Description Possible Values Change Date
The column will track the last date and time of the last change to an individual record.
Current UTC timestamp.
Change Type
This column will track the type of last change made to a record.
This column will track the type of last change made to a record.When a record is inserted or updated corresponding change types are used: "I" for insert (a new record is added), "U" for update (an existing record gets an updated value), or "A" for upsert (insert records if they do not exist yet in the target table, or update them by primary key if they do exist). When an existing record is deleted other specific change types are used (for example "D"). Note that deleting a record will not physically delete it, so that the changes can be propagated to the different objects that consume it in delta mode. It is however filtered out when accessing the Local Table (using the Active Records Table). Also, note that the change types provided by the different SAP Datasphere apps vary and may depend on the actual source that is connected. The handling of the different change types is implemented internally by SAP Datasphere apps that consume the Delta Capture Table with no need for consideration in modeling. For more information on records deletion, see Load or Delete Local Table Data

Importing a File to Your Local Table With Delta Capture Enabled
For example, if I import a csv file with new data, the change type is set to "I".
For more information, see Load or Delete Local Table Data
Deployment and Consumption of Local Table With Delta Capture
-
The table that contains the delta capture columns. The technical name ends with "Delta".
-
The table that contains only the active records. It excludes both the delta capture columns and deleted records ("M" and "D"), and keeps only the active records.
-
Most SAP Datasphere apps consume a local table with delta capture through the Active Records table only. In these cases, local tables behave the same way independent of whether Delta Capture is set to "On" or "Off". For examples in Graphical Views, SQL Views, E/R Modeler or Business Builder.
-
The following SAP Datasphere apps also interact with the Delta Capture Table that contains the delta columns:
-
Transformation Flow:
-
As Source, you can choose between source with "Delta Capture" or "All Active Records". See Add a Source to a Graphical View
-
As target, it depends of the combination of the load type used and the table type (local table with or without delta capture). See Processing Changes to Sources and Target Tables and Create or Add a Target Table to a Transformation Flow
-
-
Replication Flow: The Delta Capture Table can be used as source or as target, see Creating a Replication Flow and Add the Source for a Replication Flow.
-
Table Editor:
-
Data Preview: Once deployment is completed, it shows only the delta capture tables. See Viewing Object Data
-
Data Maintenance: You can perform table maintenance on the delta capture table (only) once deployment is completed. See Maintain Local Table Data
-
File upload: You can update the delta capture table by uploading a new csv file, after deployment is completed. See Load or Delete Local Table Data
-
-
Displaying Records Archived in Your ABAP Source System in Views
If you archive records in your ABAP source system, these records are by default replicated as deletion (change type 'D') and marked as deleted in a table with delta capture enabled. They will therefore not be available in SAP Datasphere views for consumption, as views will read from the active records table, which excludes both deleted (change type 'D') and archived records (change type 'M').
So that the archived records from your ABAP source system do not appear in your tables in SAP Datasphere as deleted records, please follow the guidance from SAP Note 3290438
that suggests two configuration options using the table DHCDC_TRIGGERSTG in the ABAP source system (value 'A' or value 'D').
The target table for this transformation flow can either be a copy of the source table or the source table itself (in that case please introduce an additional filter to only process records with change type 'M').