Anaplan Connect - Export Process Script

Hi team,

 

I have a Anaplan Connect script to export a process of 1 action (just for test purposes) but I cannot get it to work. Currently receiving the attached error. My script is below

 

Thanks

 

@echo off

set AnaplanUser="email:PW"
set WorkspaceId="8a81b09e6181d3600161b51408040171"
set ModelId="1EFC79258714420A9FFE460E0A008194"
set ServiceUrl="https://api.anaplan.com"
set AuthUrl="https://auth.anaplan.com"
set DumpName= "C:\Users\mturkenburg\WHISPIR\Gareth Edlin - FP&A\Anaplan\P&L\Monthly Uploads\errors.txt"
set Chunksize=50
set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -Process "Test Export" -execute -get "C:\Users\mturkenburg\WHISPIR\Gareth Edlin - FP&A\Anaplan\P&L\Monthly Downloads\1.1 P&L OPEX Buckets - Month.CSV" -output %DumpName%

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

Best Answer

  • jnoone
    Answer ✓

    Hi - In the Set Operation line, right after the line:  -Process "Test Export" -execute  you should add in the following syntax:  -file "1.1 P&L OPEX Buckets - Month".  That way it knows what downloaded file to look for from your model.  Full syntax would be:

     

    set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -Process "Test Export" -execute -file "1.1 P&L OPEX Buckets - Month" -get "C:\Users\mturkenburg\WHISPIR\Gareth Edlin - FP&A\Anaplan\P&L\Monthly Downloads\1.1 P&L OPEX Buckets - Month.CSV" -output %DumpName%

     

     Hope this helps resolve.

     

    JT

Answers

  • Thanks @jnoone 

     

    It''s confusing that the -file variable for imports is the name of the Source Label file while for exports it is the name of the export action! Also I spelt process with a capital P originally and this was causing an issue