Duplicate entries - Module to module import

Hi,

 

While carrying out a module to module import, if we do not import zeroes first in the target module, the values tend to sometimes double up if we execute the action twice (even after selecting the "Clear target prior to import" option while creating the action) but sometimes they reflect correctly even after executing the action twice or thrice. Is there any particular instance where this happens or is there a way to skip creating the "Import zeroes" action button? 

@Sampriti.Anand 

 

Regards,

Kartikay

Answers

  • Hi @kartikay2110 

    Good question! if your values are in loop then it will duplicate when you run action more than once. sometimes, even in loop it might not duplicate because it might not end in returning value to make a loop. So, importing zeros is imperative in this task even if some values does not end in loop. 

    Make a process - 
    1. Import null values/zeros
    2. Model to model import action

    And run the process, it will never duplicate.

    Thanks,
    Manjunath

  • @kartikay2110 

     

    Actions within Anaplan are "dumb" in that they just overlay the target values.  For example, in a cell, I have a 10, but my import now has a 20, the final number will be 20.  Now, in the import, if you have multiple values for the same intersection of data, it will automatically aggregate them on the fly and load the aggregated number.  For example, if I have the following:

     

    Date......Product.....Value

    7/01/2022.....ABC....10

    7/15/2022.....ABC.....20

     

    And my targe module is dimensionalized by Time (at the month level) and Product, the action will load a value of 30 for July 2022.

     

    And I disagree with that loading zeroes is imperative, as it depends on the source of data.  If you are doing a delta load where you are only loading data that has changed, you don't need to zero out the target data because the action will overlay the data.

     

    Rob 

  • Hi Rob,

     

    Thanks for the quick reply. By Delta load, do you mean only those instances will be there in source for which data has changed? And if you import these instances in target, will it just replace instead of adding up?

     

    Regards,

    Kartikay

  • @kartikay2110 

     

    Yes, you are correct on the delta load, only importing data that has changed.  But even with delta loads, if you have source data that is at a different granularity than the target (module), my example above still holds true that it will aggregate the data on the fly when the source data (at the daily level) gets loaded to a monthly target.  And it is not just at the time level, you could have multiple SKU's getting aggregated to a single product, if your source data is at the SKU level but the target is at the Product level.

     

    Rob

  • @kartikay2110 Indeed, sometimes the data in the target module could contain "more" data than expected, but this is because the source data changed the combination of the elements (like a "merge").

    The duplication of data cannot happen on the same cell combination when "Clear Target prior to import" was used. 

     

    Below are some reflections about the import actions:

     

    1. If the source data is "more detailed", then the numeric data is automatically summarized in target module. 

    2. By default, import action overrides data for the same cell target combination

    3. By default, if 2 imports are launched in 2 different moments, for the same data source-target module and in the first import the data was present in a combination of elements and in the second import the data is present on different combination, in target module will remain both data combinations (it's like a "merge"). 

     

    4. To avoid Point 3, it is needed to find some "Deletion Criteria" to clean the data first ( by using "All Items" for the other lists other than Deletion Criteria)

     

    To make an example for point 3: Imagine a module with Time, Customer and Product lists:

    When launched first time the data source data is like this:

    Mar 22 C1 P1 10

    Mar 22 C1 P2 20

     

    When launched second time, the source is like this:

    Mar 22 C1 P3 15

    Mar 22 C1 P2 25

     

    In Target module the data will look like this:

    Mar 22 C1 P1 10  ( from first launch)

    Mar 22 C1 P3 15  (from second launch)

    Mar 22 C1 P2 25 (from second launch)

     

    What should be present in the target module is source data:

    Mar 22 C1 P3 15

    Mar 22 C1 P2 25

     

    The "Deletion Criteria" is something that can be assumed about the source data:

    - in Source data there is always a full-month data

    - in Source data there are always present a full data related to a Version

    - or a combination of criteria 

     

    In this example, the "Deletion Criteria" will be the Time: the source data contains all the data for a particular Month. 

     

    In this case, the Import action needs to be setup like this:

    - Flag "Clear target prior to import"

    - for Time: matched Items only

    - For Customer List:  set "Which target items to clear prior to import?" with "All Items"

    - For Product List: set "Which target items to clear prior to import?" with "All Items"

     

    This way Anaplan will "know" to clear All Items combinations for the Month "Mar 22" (including the C1, P1 combination that was imported in a previous launch). 

     

    Below are some screenshots:

     

    alexpavel_0-1651496603451.png

     

    alexpavel_1-1651496637443.png

     

    alexpavel_2-1651496667880.png

     

    alexpavel_3-1651496694293.png

     

     

    By using a combination of "Matched Items in Source" and "All Items" settings in the import actions you could avoid to create a separate action to import zero data. 

     

    Hope it helps

    Alex