Delta Loading in SAP Datasphere Based On The ABAP CDS View - SAP Blogs
Delta Loading in SAP Datasphere Based On The ABAP CDS View - SAP Blogs
4 7 259 SQL
#ABAPCDS
In applications where there is a high volume of data #CDS
creation, changes, and deletion happens, such as sales
#cdsAnnotations
orders, it is crucial for the application to have a mechanism
that provides delta records and for the extractor that needs View more...
to provide delta loading. This means that the application
should be able to identify and extract only the new,
modified or deleted data, ensuring efficient and accurate Similar Blog Posts
data loading.
SAP Datasphere – New
Replication Flow
In some of the cases nightly full uploads are not what we
By Mastan Reddy
exactly want, as time windows for data extractions are Veeramreddy Apr 07, 2023
limited. Solution for that is coming with ODP framework.
SAP Datasphere -
The ODP framework for CDS extraction provides delta Implementation Best
capabilities. We have actually two options for delta Practices
handling that we can chose from: By Prasanna Lakshmi
Kona Jun 23, 2023
SAP Datasphere:
@Analytics.dataExtraction.enabled: true I_CustSalesPartnerFunc
@Analytics.dataCategory: #FACT CDC enabled but not
@Analytics.dataExtraction.delta.changeData working - Why?
define view ZCDS_SALES_DELTA as select fro
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 1/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
@Analytics.dataCategory: #VALUE
#CUBE
#AGGREGATIONLEVEL
#DIMENSION
#FACT
@Analytics.dataExtraction.enabled: true
Analytics.dataExtraction.delta.changeDataCapture.aut
omatic
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 2/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 3/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
Running Snapshot
We will see that the description in the “Short text for sales
order item” field of the Sales Documents changes in the
source system and is updated in Datasphere using the Real-
Time Access feature.
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 4/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
Now let’s change the “Short text for sales order item” field
description of the Sales Documents in the source system
and see how it is reflected in the Datasphere.
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 5/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 6/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
@Analytics.dataExtraction.delta.byElement.name
cast(substring(cast(upd_tmstmp as abap.char(32)),1,8) as
abap.dats) as LastChangeDate
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 7/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
TO_DATE node
FILTER node
There are two methods we can apply to run the Data Flow
we created. They are:
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 8/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
Best Regards.
Alert Moderator
4 Comments
Julian Juraske
September 7, 2023 at 7:47 am
Hello Adem,
Do we not transfere the whole datatable in the second option from sourcesystem to
targetsystem ?
Shouldn't the purpose of Delta be, to transfere only the required data recors?
Is there a way to bypass the Value (Changedate) as a Filter to the Source ? (e.g. in a
BW Extractor)
Otherwise I could also just drop the Table and load full in the Dataflow, or implement my
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 9/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
own Deltalogic within Datasphere(using SQL View) or use the Append Option in
combination with UPSERT.
Best Regards
Julian
Like 0Share
Hello Julian,
Best Regards.
Like 0Share
Julian Juraske
September 7, 2023 at 10:19 am
Hello Adem,
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 10/11
7/9/23, 12:48 Delta loading in SAP Datasphere based on the ABAP CDS view | SAP Blogs
In your first Option (CDC) you only Transfer the changed Records
(after Initial Full Load) = Delta.
In the second Option (DF) you ALWAYS(not only Initial) transfere the
whole Data from Source to Target.
Basicly what you are doing is a Full Load from Source to Target, and
Filter out the required Records in the Targetsystem (by setting a
Change Timestamp in Source).
The second Option (filter in Target System) can be achieved by many
different aproaches (e.g. SQL View comparing Data from today vs
yesterday, or the APPEND UPSERT Mode)
However for me this is not a real Delta, since you do not bypass a Filter
to the Source to reduces the amound of Records transfered.
Best Regards
Julian
Like 0Share
Martin Kreitlein
September 7, 2023 at 8:00 am
Hello Adem,
What is missing here, for my understanding... how exactly is the Delta transfer
Followtechnically?
happening
Where is the information stored which records have been transferred successfully and
which not?
I tried to find the details about this in the Online Help, but I could not really find the
answers.
Thanks, Martin
Like 0Share
https://blogs.sap.com/2023/09/06/delta-loading-in-sap-datasphere-based-on-the-abap-cds-view/ 11/11