[ANAPLAN CONNECT] Execute multiple operation with only one authentication
Hello,
I hope you're all doing fine.
I would like to seek help on looking for a best practice that could reduce significantly the running time of my anaplan connect script.
I am using Anaplan Connect basic Import authentication.
The script I am running the script consists in the execution of set of operation for each element contained in a list previously downloaded from Anaplan.
The (simplified) pseudo code of what I achieved is the following:
execute export command that download list.txt for each element in list.txt do ( update a file called actual.txt (that represent the current element) execute import command that upload actual.txt (Anaplan model now know what's the actual element) execute export command based on the actual value recently updated. )
The "problem" is that if I set every operation like the following
set Operation= -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -file (…continue…) set Command=..\AnaplanClient.bat %Credentials% %Operation%
I'll proceed with a new authentication (that take time) for every operation, and for each element in the list.
This way the script is going to repeat a high number of authentication that, in my opinion, are not really necessary.
Is there a way to authenticate only once and then proceed in executing a number of different action/processes throughout the script?
I couldn't find anything useful for this in the documentation.
Let me know if something may not be clear, or if this point is already explained somewhere.
Thanks a lot in advance.
Francesco
Best Answer
-
Hi @francesc0 - you can easily have multiple operations in an Anaplan Connect script by simply chaining the operations together. Here is an example that does the following:
1) Lists the models in a Workspace2) Uploads two files, "Sales1.csv" and "Sales2.csv"
3) Finally, executes a Process
set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -models -chunksize 1 -file "Sales.csv" -put "/data/Sales1.csv" -chunksize 1 -file "Sales2.csv" -put "/data/Sales2.csv" -process "TEST_PROCESS" -execute -output "/data/dump/TEST_PROCESS_dump.zip"
Between each operation, it will use the same login.
It is easy to create "chained" operations using the Anaplan Integration Script Builder. The "operation" line above was dynamically built using this tool. Learn more here.
0
Answers
-
As far as I know, AnaplanClient.bat performs authentication each time is runs and there's no option to pass the authentication token from one step to the next.
Speculating: I wonder if oAuth authentication is faster than Basic? With oAuth, Anaplan and your server establish a secure relationship, in your AC script, you just provide the Client ID. oAuth is easier to set up than Certificate. I suspect it may also be faster.0