Community Boss

Anaplan 4.3 - Export process

Hi Guys,

 

I am using Anaplan 4.3 and I am planning to do an export process I was able to run the import process successfully but I cannot seem to run the export process successfully. I tried to copy the contents on the Anaplan Connect Document but it is different from the sample script in 4.3 folder.

 

Anaplan Document from Wikipedia:

Jsdeloria21_0-1580276896523.png

 

Sample Anaplan Script from the folder:

 

Jsdeloria21_1-1580277011484.png

My Script which does not work:

Sample export is the Process Name I used.

Jsdeloria21_2-1580277265225.png

My apologies for removing the Model ID and Workspace ID.

 

Hope you can help.

 

Regards,

 

 

 

 

6 REPLIES 6
Highlighted
Community Boss

Re: Anaplan 4.3 - Export process

@Jsdeloria21 

 

I think Name of the exported file is missing. I can see that you have provided process name and then the dump name (this dump folder is used for error log). That is my initial observation by looking at the script, will deep dive and let you know if I find anything else. In the meantime you can add .get command as well and see if that fixes the issue.

 

Thanks,
Misbah

Highlighted
Community Boss

Re: Anaplan 4.3 - Export process

Hi Misbah, 

 

I entered the get command in the line. Did I do it right? Or I have some space issues?

 

@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=""
set WorkspaceId=""

set ModelId=""

set ServiceUrl="https://api.anaplan.com"

set AuthUrl="https://auth.anaplan.com"

set ExportName="Sample Export"

set DumpName="C:\Users\User\Desktop\Anaplan Connect\Anaplan Connect 4.3\anaplan-connect\Dump.txt"

set Chunksize=1

set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %8a81b09d56620c0301566b60d0cc496f%49D024CFA14B44BDBA976B4BB00B3ACA% -chunksize %Chunksize% -export %Sample Export% -execute -get &C:\Users\User\Desktop\Anaplan Connect\Anaplan Connect 4.3\anaplan-connect\Sample.csv& -output %C:\Users\User\Desktop\Anaplan Connect\Anaplan Connect 4.3\anaplan-connect\Dump.txt%

 

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

 

Regards,

Highlighted
Community Boss

Re: Anaplan 4.3 - Export process

@Jsdeloria21 

 

I just noticed that in your script "Sample Export" is the name of the process and not export so you will have to use the word Process in your Set Operations. If you are using Batch Script below order of the script might help

 

Let's say in you process there is one import and one export so your script should be like

 

- Set Operation = -file "Import file.csv" - Put"Folderpath\Import file.csv" - Process "Sample Export" - execute -file "Name of your export  in the process" - get "path of the exported file" - Output "Dump folder path"

 

Below is the sample script from Anaplan with two imports and two exports of a process

Misbah_0-1580283668831.png

 

Hope that helps

Misbah

 

Highlighted
Community Boss

Re: Anaplan 4.3 - Export process

Hi Misbah,

 

Below is the latest script I made. It is just flashing for a moment and disappear.

 

@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="joseph.sherwin@scanomi.com:Jsd@deloria20"
set WorkspaceId="8a81b09d56620c0301566b60d0cc496f"

set ModelId="49D024CFA14B44BDBA976B4BB00B3ACA"

set ServiceUrl="https://api.anaplan.com"

set AuthUrl="https://auth.anaplan.com"

set ExportName="Sample Export"

set DumpName="C:\Users\User\Desktop\Anaplan Connect\Anaplan Connect 4.3\anaplan-connect\Dump.txt"

set Chunksize=1


set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -process %Sample Export% -execute -file %INV01 Inventory Ordering - Beginning Inventory.csv% -get %C:\Users\User\Desktop\Anaplan Connect\Anaplan Connect 4.3\anaplan-connect\Sample.csv% -output %C:\Users\User\Desktop\Anaplan Connect\Anaplan Connect 4.3\anaplan-connect\Dump.txt%

 

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

 

Are we suppose to use " " on set operation or %.?

 

Regards,

 

Highlighted
Community Boss

Re: Anaplan 4.3 - Export process

@Jsdeloria21 

 

Can you change the command Set ExportName to Set ProcessName. I think script is looking for exports when it has to look for process. Or else if you want export to run then in Anaplan rename your export as "Sample Export"

 

"Pause" in the script too is not working. Pause freezes the screen and doesn't let it flash and go.

Note: If your chunk size is 1 then you don't need that because default chunk size is 1 anyway but if you are using chunk size then make sure that you use chunk command before put command.

 

And finally if you are using Linux/Mac OS then you use $ instead of % sign as shown below. Also use Single quotes instead of double quotes. Don't use Word instead use Notepads or textpads

Misbah_0-1580288552110.png

For more information please go through Anaplan Connect Guide 1.4.3. It is really helpful

 

Hope that helps

Misbah

Highlighted
Community Boss

Re: Anaplan 4.3 - Export process

Hi Misbah,

 

I tried to change the Set ExportName to SetProcessName and it still just flashing then disappear. Also, upon checking the document it is more confusing since it has a different approach.See below

 

Jsdeloria21_0-1580304897361.png

I did this approach the first time and it did not also worked. But I will try to recreate this script and run it.

 

Regards,