Guide to import data from PostgreSQL/JDBC source to Anaplan using Anaplan Connect


1.    Introduction

I have written this guide to hopefully help save some time as I encountered a few, less straight forward, issues when setting this up. There is a guide describing Anaplan Connect, so please regard this as a complement to that guide on how to set up a JDBC connection. I will use PostgreSQL as an example throughout this guide, but this should work with any JDBC source.

This guide will step you through how to set up and use Anaplan Connect to import data from a PostgresSQL table. Please note I am using the PostgreSQL JDBC driver in this example as the JDBC:ODBC bridge is not supported in Java 8+.

I will step through the parameters used in the example script to explain what action they perform and how to use them in the script.

I wrote the below script using Notepad++, but any text editor will work. You will need to save the file as a .bat file that you will run to kick off the import. You will need to store the .bat file in the root of the Anaplan Connect directory.



2.    Prerequisites

You will need to start off with a csv version of the import that you are setting up. Easiest would be to export the PostgreSQL table you are planning to set up the import for and use this for the first csv import.

The csv import is done to create an import action that will be called from the .bat script. Please take extra care when setting up the import as the PostgreSQL import will need to be in tab format rather than comma separated. I did this by running the csv as comma separated import and then changing the import specification in Anaplan to be tabular. I am sure there are other ways of doing this, but this worked well for my purposes.

After running the csv import, it is time to write the script.


3.    Explanation of the batch script

I will only focus on the parts that you will need to edit in the script. Above you will find the full script which is based on the example in the Anaplan Connect guide with a few additions.

BAtchTable.pngThe “-import” and “-execute” commands are not in the Anaplan Connect user guide batch examples, but they will need to be included for the import to run. If left out you will still receive a message the import transferred data, but your target model will not have received any as you will not kick off the actual import action.


Good luck!