Simulating Ad-Hoc Data Push With Anaplan Connect

Currently, Anaplan does not support data push, or ad-hoc integrations from within the platform. This can be achieved using a microservice, such as Flask, but can also be simulated using Anaplan Connect and a couple simple scripts and a simple module within your model.

 

The first step is creating a small module in your model with two boolean line items, one that users can check when they wish the push to occur, and another that is permanently FALSE. Create a simple import into this module with itself as the source, where you import the FALSE boolean into the clickable boolean.

 

Fig. 1: Export trigger module

Screen Shot 2019-03-14 at 19.37.40.png

 

Fig. 2: Import definition

Screen Shot 2019-03-14 at 19.38.00.png

 

Fig. 3: Import mappingScreen Shot 2019-03-14 at 19.38.11.png

 

This will reset the trigger to prevent unwanted data pushes.

 

Once this is set up, created a saved export of the above module. Use Anaplan Connect to trigger and download the export, you can schedule this to run at any cadence you desire (every 5, 10, etc minutes). Use another simple script to review the file to check for a TRUE value, if found call an Anaplan Connect script that executes the import action defined above, then call your script(s) that execute the desired actions.

 

Batch script to review file content for TRUE value:

@echo off
for /F "tokens=1-2 delims=," %%A in (export.csv) do (
set execute=%%B)
if %execute% equ true do ( call Data-Extract.bat )
pause

 

The rough flow for this solution would be:

  1. Export the trigger module at a regular cadence to check for a TRUE value
  2. Once found reset the trigger
  3. Call scripts that extract data/execute model-to-model imports

 

This is a very simple, but effective way to allow users to trigger integrations from within your model, in an ad-hoc fashion.

 

Answers