Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
wilson_kurian3
Advisor
Advisor

With the latest version of SAP Datasphere (2024.6), we now have the delta extraction feature for the ADSO in SAP Datasphere, BW Bridge and it simplifies the data replication from BW Bridge to Datasphere.

More info on this topic is given in the help page below.

https://help.sap.com/docs/SAP_DATASPHERE/c8a54ee704e94e15926551293243fd1d/4c088d1f9bc04d95b7b7cb3801...

How it works

Previously in SAP Datasphere, when importing the ADSO (from BW Bridge) via the “import entity” feature there was only 1 remote table that was visible as source representing the “active” data table of the ADSO. With the new delta feature, we have the option to import 2 remote tables for the ADSO with the naming conventions adopted as ADSO Name- “Reporting” and ADSO Name - “Extraction”. The Reporting table represents the active data table as before, but the new “Extraction” table represents the delta changes of the ADSO.

wilson_kurian3_0-1711562986611.png

When previewing the data of the “Extraction” table we get the same data set as the “Reporting” table. In order to get the delta only records from the “Extraction” table we must use a Transformation Flow to extract the delta records into a target local table in SAP Datasphere. This local table can then be used as a source for further modelling of the delta records or send to other outbound destinations via the Replication Flow. These outbound destinations could be SAP or non-SAP by taking advantage of the SAP Datasphere, Premium Outbound Integration Service.  

Prerequisite

  • The ADSO in BW Bridge should be a standard one with “write change log” enabled.
  • The ADSO should have at-least 1 primary key defined.
  • The properties of the primary key/keys should have the Master Data Check enabled for reporting.

Example

In this example I have taken a very simple case of updating a master data object to see the delta changes. I import a standard ADSO called Plant Master Data (Tech name – ZPLANT_MD) from my BW Bridge into the BW Bridge space in Datasphere and then I will share the “Extraction” table with my own space. In my own space I will then create a Transformation Flow which will extract delta only records from the “Extraction” table into a target local table. I will then make some changes to the source data so we can see that the Transformation Flow extracts only the changed records to our target local table.

1. Creation of an ADSO in BW Bridge

In my BW Bridge, I created a standard ADSO with 2 Info objects (for simplicity). It is imported that at-least there is 1 primary key and the key has the Master Data Check enabled for reporting.

wilson_kurian3_1-1711562986620.png

2. Importing ADSO from BW Bridge into Datasphere

In the BW Bridge space, under the Data Builder I used the “import entity” feature to import the ADSO via the BW Bridge connection. I searched for my ADSO and now I have the option to import and deploy 2 remote tables. As you can see below, by default Datasphere distinguished both tables by giving an extension to the table viz - “Reporting” and “Extraction” extensions. In this case I am only interested in the “Extraction” table, and I import that.

wilson_kurian3_2-1711562986624.png

3. Check the delta table features

Once the table is imported you can see the below new properties of the table

  • The table is “delta capture” enabled and the actual source delta table is denoted by an extension “ _delta”.
  •  In addition, under the Columns Tab, there are 2 New Timestamp fields – Change Type and Request TSN which are used in the Input Parameters tab
  • In addition, under the Input Parameters Tab there are 3 new parameters which are used to filter the data for delta only records when extracting the data via the Transformation Flow.

wilson_kurian3_3-1711562986628.png

wilson_kurian3_4-1711562986630.png

wilson_kurian3_5-1711562986632.png

4. Creation of Transformation Flow in Datasphere

I shared the ADSO “Extraction” table with my own space and then in my space I created a Transformation Flow to extract it to a local Datasphere table with the “Delta Capture” and “Initial and Delta” options as per below.

wilson_kurian3_6-1711562986637.png

wilson_kurian3_7-1711562986639.png

5. Initial full run of the Transformation Flow

I ran the initial run of the Transformation Flow and checked the results of the target table. I got 287 records which are same as in my Active table entries.  

In my example below the Plant = 1000 = Hamburg and there is no entry for Plant = 1700. I will use these entries to perform some changes in the source so that delta changes are captured.

wilson_kurian3_8-1711562986644.png

6. Creating changes for delta extraction

I changed my source data and in this example, I have done the following changes to my source data.

  1. Update - changed Plant 1000 = Hamburg to Plant 1000 = Hamburg (updated)
  2. Insert - Added 1 new record, Plant 1700 = London

I triggered the delta DTP in BW Bridge which updated the ADSO with the changed records. In this example I can see in my “BW Cockpit” that my ADSO has 2 new changed records.

 wilson_kurian3_9-1711562986650.png

7. Delta run of the Transformation flow to fetch delta only records

To fetch those changed records I ran the Transformation flow again and it fetched 2 records as it recognized that the ADSO has 2 new records. This is the key part of the scenario where the delta only records are extracted as previously only full extraction was possible from the ADSO of the BW Bridge. Now when I preview my target table, I can see that the records are updated and added accordingly.

wilson_kurian3_10-1711562986658.png

wilson_kurian3_11-1711562986663.png

 

8 Comments