Anaplan Connect - multiple files import


Good evening, 


I have 4 files that need to be imported in anaplan, that have the exact same columns name and that will hence use the same action. 


Is it possible to  write a single script by 'cumulating' the actions and having something like : set Operation=-file "file1.csv" -put "data/ImportModule.csv" -import "New Hire from Employee.txt" -execute  -file "file2.csv" - put "data/ImportList.csv"-import "New Hire from Employee.txt" -execute [same for file 3 and 4...]


Or would I need to have 4 different scripts ? 


Thanks in advance for your help, 



Best Answer

  • ben_speight
    Answer ✓
    This should be fine. Anaplan Connect processes the command line options in the order that they appear. You actually only need to specify -file once - after that every -put will be to that file (if no -file was specified before a put then the file name is used). Likewise, you only need to specify -import once - until another import, export, action or process is specified then that will be run by any subsequent -execute. If you need to collect a dump file (using -output) you must do so before you run that import again. The file names you provide are confusing though - importing into a module requires a different import action to importing into a list, although they can both use the same source.


  • HI Sarah,


    According to my knowledge, you have to have 4 different batch scripts to upload the files because here you are trying to import different files into same action. Consider the same in Anaplan manually we will do the uplaod one by one.


    Lets wait for other experts to throw their answer 🙂


    Thanks ,


  • @sweemaels ,


    You can upload all of the files in one batch script, but the actions will need to be different as the actions are tied to the file name so please make the file names different.  Also, for audit reasons, I am not sure you will want to overwrite the files.


    Hope this helps,



  • Hi Ben, 


    Thank you for your answer. I am trying to implement the script with: 

    2 files: ACHATS.csv & DIV3.csv (that have the exact same format)

    using the same process: "Charger les depenses"


    My script looks like this, but doesn't seem to be working  (I attached the bat file summary). Any idea of what is wrong ? Could it be due to the fact that the source label of the actions of the process does not have the same name as my two files ?


    @echo off
    rem This example loads a source text file and runs an Anaplan import into a module.
    rem For details of how to configure this script see doc\Anaplan Connect User Guide.doc

    set AnaplanUser=""
    set WorkspaceId="8a81b00xxxxe0a01727ac0"
    set ModelId="FDADAA9xxxx4F346FC3827A"
    set Operation= – certificate “C:\Users\sweemaels\Documents\3. Clients\XXX\anaplan-connect-1-3-3-5\certificate-xxx.cer” - file "DIV3.csv" -put "C:\Users\sweemaels\XXX\4. Load - Templates\DIV3.csv" - file "ACHATS.csv"
    -put "C:\Users\sweemaels\XXX\4. Load - Templates\ACHATS.csv" - process "Charger les depenses" -execute

    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%

  • @sweemaels ,


    Try removing the spaces between the "-" and the command.  So, it is should be -certifcate, -put, -file, and -execute.


    Hope this helps,



  • Hi Rob, 


    thanks for your answer.Unfortunetaly it doesn't look like it changes anything.. 


    Kind regards, 



  • Sarah,


    What does the error message say?