Feeder Calculation Data Load Logic

The Calculation Data Load, which additionally uses also Feeder logic, is almost the same as Regular Data Load logic, with some small differences described in this article. See the Regular Calculation Dataload Logic reference for the rest of the information, which is not duplicated here.

You will use a Feeder Calculation Dataload logic when you need to:

  • Enrich a Datamart or Data Source with data from Rebate Records or some other data. A usual use case is allocation of rebates to historical transactions.

    • Technically you’re modifying existing records and adding the rebate information into it.

Logic API

  • Execution Types

    • "init" group in standard mode - You may use this to "reset" the amount of rebates allocated on the rowset row, before the allocation (in the "row" elements) begins.

    • "row" group in standard mode - Note that this will be executed multiple times for the same data row! This is because more Rebate Records can depend (or we could say "can be influenced") by the same sales transaction record (i.e., a Datamart row).

split rebate to transactions
Figure 1. Visualization of how multiple rebates are distributed over rows in a transaction Datamart. Transaction 1 is only encompassed by a single rebate, while Transaction 3 is encompassed by two rebates.
rebate allocation tables
Figure 2. Visual representation of rebate allocation that involves multiple rebates - for the general case where each transaction may be part of multiple rebates. Note that the transaction T2 occurs in the calculation of two rebates, thus the transaction rebate field in the Datamart will contain a sum of two contributions.
  • Information provided to the logic

    • To the "row" group in "standard" mode

      • api.currentItem() - An object (only one) emitted from the Feeder logic. In case of rebates, this is usually a Rebate Record, which represents the rebate money to be allocated to the transactions (rows in a Datamart).

Code Sample

Found an issue in documentation? Write to us.

Â