How to upload multiple files using multiple import actions with one Anaplan connect script?

Options

Currently I am using this script, it is unable to upload the second file

@echo off
rem For Windows OS : This example explains the usage of basic Authentication with Anaplan Connect.
rem It also loads a source text file and runs an Anaplan import into a module.
rem For details of how to configure this script visit https://help.anaplan.com/anapedia/Content/Downloads/DL_Downloads.html

set AnaplanUser="UserID:Password"
set WorkspaceId="Workspace ID"
set ModelId="MODEL ID"
set ServiceUrl="https://api.anaplan.com"
set AuthUrl="https://auth.anaplan.com"
set FileName="SYS.018 PRK Code (Maintenance).csv"
set FilePath="C:\Users\udit.bhageria\Documents\Anaplan\PLN\File\SYS.018 PRK Code (Maintenance).csv"
set ImportName="15 IMP List PRK Code (Maintenance)"
set DumpName="C:\Users\udit.bhageria\Documents\Anaplan\PLN\error log\Maintenance File for Integration.csv"
set FileName1="SYS.022 PRK Code (Administration) (1).csv"
set FilePath1="C:\Users\udit.bhageria\Documents\Anaplan\PLN\File\SYS.022 PRK Code (Administration) (1).csv"
set ImportName1="27 IMP List PRK Code (Administration)"
set DumpName1="C:\Users\udit.bhageria\Documents\Anaplan\PLN\error log\Error File for Integration.csv"
set Chunksize=1

set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -file %FileName% -put %FilePath% -import %ImportName% -execute -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% %Operation%
@echo %Command%
cmd /c %Command%
pause

Answers

  • Hi,

    You might want to hide your password from the script that you have asked on open community!

    You can include next file to Anaplan connect script simply by adding new -put &FilePath2% - import %ImportName2% - execute -output %DumpName2%

    Br,

    Pyry