Professional Documents
Culture Documents
Guide To Import Data From PostgreSQL
Guide To Import Data From PostgreSQL
Guide To Import Data From PostgreSQL
https://community.anaplan.com/discussion/30044/guide-to-import-data-from-postgresql-jdbc-
source-to-anaplan-using-anaplan-connect
stefangradin
February 2018
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.
The “-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.