Hello,
I hope you're all doing fine.
I would like to seek help on this issue that I'm currently having a challenging time accomplishing.
I am using Anaplan Connect basic Import authentication.
I am successful running the script when only one file is in the script.
If I tried to include two files in the script, it is not recognizing the other one.
It is possible that I'm going to use the script and there will be a lot of files to be imported come production.
Is it possible? Please help.
Below is the script that I'm using with basic authentication, this is working fine.
But how can I include additional file in the script?
@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="myusername:mypassword"
set WorkspaceId="myworspaceid"
set ModelId="mymodelid"
set ServiceUrl="https://api.anaplan.com"
set AuthUrl="https://auth.anaplan.com"
set FileName="file1.csv"
set FilePath="C:\Users\myprofile\desktop\file1.csv"
set ImportName="Import File 1"
set DumpName="C:\Users\myprofile\Desktop\ANAPLAN CONNECT\Anaplan Connect Import"
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
==========================================================
I tried the below script in attempt to include another file in the import but it only processed the file2:
@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="myusername:mypassword"
set WorkspaceId="myworkspaceid"
set ModelId="mymodelid"
set ServiceUrl="https://api.anaplan.com"
set AuthUrl="https://auth.anaplan.com"
set FileName="file1.csv"
set FilePath="C:\Users\myprofile\desktop\file1.csv"
set ImportName="Import file1"
set FileName="file2.csv"
set FilePath="C:\Users\myprofile\Desktop\file2.csv"
set ImportName="Import File 2"
set DumpName="C:\Users\jspas\Desktop\ANAPLAN CONNECT\Anaplan Connect Import"
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
Thanks a lot in advance...