10.2 and before.
We received in 2016 a protocol from Skyline for an aggretation element, that aggregates KPI's from several other elements and aggregates those KPI's (taking min, max and average for each).
Your doc I found : https://docs.dataminer.services/develop/devguide/Connector/AdvancedViewTablesOtherElement.html
For each KPI there is an action defined.
There are 100 KPI's and the last one has an option DELETEHISTORY.
What is the function of this DELETEHISTORY and is it really necessary (pro's and con's) ?
Code penultimate and last action:
<Action id="3183">
<On>protocol</On>
<Type options="remoteElements:11;trigger:3183;destination:3183;type:avg;mergeResult">merge</Type>
</Action>
<Action id="1031">
<On>protocol</On>
<Type options="remoteElements:11;trigger:1031;DELETEHISTORY;destination:3062;type:sum;mergeResult">merge</Type>
</Action>
Hi,
DeleteHistory removes the rows from the destination table that are not present in the aggregate result.
Suppose that the source table has columns and values:
PK Val Group
1 5 1
2 6 1
3 7 2
4 8 3
When taking the sum per group, this results in:
Group Sum
1 11
2 7
3 8
Suppose that the souce table then changes into:
PK Val Group
1 6 1
2 7 1
3 8 2
Without DeleteHistory, this results in the following aggregation:
Group Sum
1 13
2 8
3 8 <--- Note this row
As can be seen in the result group "3" is still present with value 8, while this group is not present (anymore) in the source. With DeleteHistory being present then this row will be removed from the result table. To increase performance, the DeleteHistory will only be added to the last aggregate action on the table. E.g. when the source table has 4 columns that need to be aggregated then it does not make sense to check to remove rows at every aggregation, this is only done with the latest action.
Regards,
Thanks for this fast and clear answer