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
Fig. 2: Import definition
Fig. 3: Import mapping
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:
for /F "tokens=1-2 delims=," %%A in (export.csv) do (
if %execute% equ true do ( call Data-Extract.bat )
The rough flow for this solution would be:
- Export the trigger module at a regular cadence to check for a TRUE value
- Once found reset the trigger
- 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.