Export data from Anaplan to SQL server through Anaplan Connect script

anildudam
New Contributor

Export data from Anaplan to SQL server through Anaplan Connect script

Hi Anaplan Connect experts,

I need some help.

I know how to write a Anaplan script to load data from SQL Server to Anaplan module.

I need sample script from you, how to export data from Anaplan to SQL server.

Could you share me your sample script please?

 

Thank you & regards,

Anil

7 REPLIES 7
Misbah
Moderator

@anildudam 

 

It's the same script with few changes, instead of PUT you need to use GET and an Export instead of Import. You also need to provide file location. See below

Misbah_0-1664199915757.png

Thanks,

Misbah

Miz Logix

anildudam
New Contributor

Hi Misbah,

 

Thank you for your response.

Actually Im looking script for SQL Server.

How to write SQL commands in the script to export data from Anaplan to SQL DB.

 

Below script for JDBC properties file for SQL Server

anildudam_0-1664235200180.png

 

Import action script for SQL Server to Anaplan

anildudam_1-1664235316740.png

 

Need the similar scripts for to export data from Anaplan to SQL DB.

 

Thank you,

Anil

 

MarkWarren
Expert

I've never tried it, or seen it actually, but in your JDBC properties file you would presumably change the query to an UPDATE statement.
Let us know if it works...
EDIT: it should be an INSERT
INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3)

There's an example of this with V4.01
Downloads - Anaplan Technical Documentation



anildudam
New Contributor

Hi Mark,

Thank you for your reply.

I will try use of UPDATE statement to insert records in SQL DB.

you mentioned INSERT statement, that will work for single records and hardcode values.

I'm looking a sample script which some exports already tested to "update SQLDB table data with export action of Anaplan"

 

I will update if any solutions works.

Thank you.

 

GeorgeDuckett
Regular Contributor

Once you've got the csv file out of anpalan wouldn't any generic 'import csv into sql' solution work?
anildudam
New Contributor

Hi George,

 

Thanks for your reply, "any generic 'import csv into sql' solution" means other than Anaplan Connect scripts?

We said to our client that, Anaplan Connect scripts works for both import and export to SQL. That's the reason looking for any solution with in Anaplan Connect.

 

Looking for any leads from other experts.

anildudam
New Contributor

Hi ALL,

I'm able to write script to export Anaplan data into SQL SERVER.

 

Anaplan Connect script

anildudam_0-1664673432151.png

jdbc properties file

anildudam_1-1664673695085.png

Thank you