As described in /wiki/spaces/UDEV/pages/3490152528, there are 4 types of distributed calculation. One of them is Enrichment.
Enrichment Enrichment
The logic for type of distributed calculation has to be PA Calculation. This type is currently available only in Pricefx Classic.
...
The calculation itself happens in a context Calculation. In this example, the transaction currency from the customer master data is modified and all pricing dates are moved. The whole code is included below. It is importantto understand, that the calculation logics are not run for every line, but it rather processes batches. This is written in the documentation but it is easy to miss it.
...
Next, we query the Datamart directly using a filter passed by the calcItem
variable. Notice that you need to add DM.
to the source Datamart. For Enrichment it is important to add selectId
to the query.
...
It takes results from the Datamart query, iterates over each line in that batch and adds the needed data. In our case, we get the currency and move the pricing date. Once all the data is modified, we add the modified row to the loader that will save the data. The important thing for enrichment is to add the id
back to the array that is passed to the loader.
...