Anaplan Connect - Export Script

Hi,

 

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

My batch file is as follows:

 

@echo off
set AnaplanUser=XXX:
set WorkspaceId="XXX"
set ModelID="XXX"
set AuthUrl="https://auth.anaplan.com"
set Operation= -export "XXX" -execute -get "XXX"
rem *** End of settings - 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

 

The error message below:

 

Running Anaplan Connect...
Using Class-Path: C:\anaplan-connect\anaplan-connect-1.4.2-jar-with-dependencies.jar
2019-07-30 15:42:29 ERROR 11544 |-- Options are:

 

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

 

(Also Error code(11544) is changing upon each run)

 

Help Appreciated and Thank you in advance!

Best Answer

  • jnoone
    Answer ✓

    Hey - the issue is your syntax for ModelId.  In the set ModelId line the "d" needs to be lower case to match the set command line.  Also in the set command line there should be a space before %ModelId% (currently they are merged together).

     

    Correcting those two issues (in red text below), should resolve your issue.  

     

    -Jt

     

    @echo of
    set AnaplanUser=XXX:
    set WorkspaceId="XXX"
    set ModelId="XXX"
    set AuthUrl="https://auth.anaplan.com"
    set Operation= -export "XXX" -execute -get "XXX"
    rem *** End of settings - 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

Answers

  • @rajinirawat 

     

    Kindly use below script if you are using basic authentication and see if this works for you. Please be aware that this script will work only on windows and not on Linux or Mac OS. You will have to write shell scripts if that is the case. Also double check if you are using Export Name or the Process to export the data - Accordingly your script should change.

    One more important point to highlight is whether or not you are using latest version of Anaplan connect 1.4.1

     

    @echo off

    set AnaplanUser="Anaplan.User@anaplan.com:Password"

    set WorkspaceId="123PQR456"

    set ModelID="789YYY543"

    set Operation=-export "Export Name" -execute -get "C:\File.xls"

    rem *** End of settings - 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

  • Thank you Misbah for the help.
  • Thank you for the help. The script is now working with those two pointed errors corrected.