Anaplan Connect - Export Script

Occasional Contributor

Anaplan Connect - Export Script

Hi,

 

I am getting the following error, followed by a list of options in my CMD window when i run my batch file.

 

My batch file is as follows (minus credentials and export names);

 

@echo off
Set AnaplanUser="Username:Password"
Set WorkspaceId="XXX"
Set ModelId="XXX"
Set Operation=-export "XXX" -get "XXX"
rem *** End of setting - Do not edit below this line ***
setlocal enableextensions enabledelayedexpansion || exit /b 1
cd %~dp0
if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model%ModelId% %Operation%
@echo %Command%
cmd /c %Command%
pause

 

This is my error message:

 

Running Anaplan Connect...
Using Class-Path: C:\Users\XXX\Downloads\anaplan-connect-1.4.1\anaplan-connect-1.4.1-jar-with-dependencies.jar
2019-07-19 15:42:29 ERROR 16992 |-- Options are:

 

And the list goes on with a huge list of options.

 

Any help would be much appreciated.

 

5 REPLIES 5
Highlighted
Expert

Re: Anaplan Connect - Export Script

Are you missing a space between -model and %ModelId%?

Also, don't forget to use -execute if you want to run the export before downloading the result.

Message 2 of 6
Certified Master Anaplanner

Re: Anaplan Connect - Export Script

Can you also trying adding an -execute before your -get command?

Message 3 of 6
Occasional Contributor

Re: Anaplan Connect - Export Script

Thanks both, I am now being asked for an Auth URL, is there a way to default this?

 

 

Message 4 of 6
Certified Master Anaplanner

Re: Anaplan Connect - Export Script

Assuming you are using the 1.4 API, add in:

 

-service "https://api.anaplan.com" -auth "https://auth.anaplan.com" after set operation= 

Message 5 of 6
Occasional Contributor

Re: Anaplan Connect - Export Script

That is great - thank you!

 

All working perfectly now.

Message 6 of 6