Composite Providers is widely used now in Mixed Scenarios, where we would be consuming the data manipulated in a Native HANA Model back into BW using a Composite Provider. When Composite Provider is used as a Source in a Data Flow in BW, only full load is possible.
But we can find the delta records which needs to be loaded to the Target by leveraging the HANA capabilities in BW4HANA. We can create a calculation view with the composite provider(Source) and the ADSO(Target) to find the delta records as shown below with a simple example.
The data from Composite Provider will be loaded to an ADSO, Lets assumes that the initial load has happened from the CP to ADSO and the ADSO has data as shown below;
Now, we are retriggering the load again from CP to ADSO
We need to compare the target data with the source, for which the Join node can be used. We can do a left join by considering source data as the Left table and join condition as the fields based on which you need to identify delta. We can only add the key fields and the measures from the target which will be needed in the further steps
From the output, we can get the records with null values in the key fields are the newly added records in the source data. To filter out the new records we can add a projection node and add a filter in the filter expression on the key fields from the target.
The output of step 2
To find the updated records in the source we need to create a flag based on the measure fields from the source and the target data and filter out the updated records as shown below;
Filter: (not isNull(“ID”)) and (“Key_Figure_change_flag”= ‘True’)
Flag: Calculated column – (“Source_Amount”–“Target_Amount”)!=0
The output of step 3
To combine these two tables, we can use the union node.
- We can capture the updated records only there are no rules written to update the measures in the transformation.
- If the updated values need to be aggregated in the target, instead of getting the values directly from the table we can find the change in value and make them available in the output.
Know more about Visual BI Solutions SAP BW Services offerings here.