Things to consider when building a robust import action
Import actions are foundational elements of an Anaplan model. Import actions can be scheduled via integration or can be called on demand via dashboards within an Anaplan model. Imports could happen from different sources such as lists, modules, saved views, and files (CSV, TXT). Import primarily import data into target lists and modules.
Imports are very vulnerable to failure if not built with care. They should be built in a foolproof manner for the proper functioning of the model as the model grows. Sometimes, adding line items, removing line items, renaming line items, etc. could impact existing import actions.
The following table depicts when an import breaks and when it does not.
|Model build activity||Breaks the import?||Comments|
|Renaming the source model||No|
|Renaming the source module||No|
|Renaming the source saved view||No|
|Renaming the target model||No|
|Renaming the target module||No|
|Renaming the source line item||Yes||Moreover, there is no error message displayed while running the action. If you have six line items mapped, and you renamed one of them, your import is actually working for only five of the line items.|
|Renaming the target line item||No||Mapping on the import is updated automatically.|
|Adding additional elements in source dimension||No||Import does not break; to ensure complete data import, make sure the target has the same elements as in the source.|
|Adding additional elements in the target dimension||No||Import does not break; to ensure complete data import, make sure the target has the same elements as in the source.|
|Changing the pivot view of the source saved view||Yes||Import breaks when we move dimensions from rows to columns or pages, and vice versa.|
Best practices to follow while building an import:
1. Always import from saved view, not directly from a module/list.
2. Only include the line items that are required for the import. Always "show" line items in the saved view and not "hide". This limits the new line items entering into the saved view.
3. Rename the module with some convention to indicate that the module has some saved views which are used in import action. For example, Sales Volume Data to EXP: Sales Volume Data. Review the action when you modify the line items in the module with this naming convention.
4. Always use code (text) when importing into a list formatted line item.
5. Filter out the summary rows from the source saved view. Ensure the view is using optimized filters with a single boolean line item per axis.
6. Rename the import action as per the convention followed in the model. More information on naming convention can be found here.
7. Always run the import action capsuled in a process.
Note: Import completes Normal when a source line item is renamed, but no updated/ignored/failed count. This means the import is not functioning properly and it indicates the source line item has been renamed.
Perhaps, it is worth adding that import also breaks when mapped line items have a dimension replaced with their respective subsets. When source module still uses 'full' dimension, but line items had a change in applies to from dimension to subset, we will need to readjust the import.
Imports also break when filter that applies for a source view had a dimension changed from ‘full’ to a subset.2