Anaplan Connect 1.4.3 Export Process Error
Hello,
I would like to seek some feedback on this issue that I'm having with Anaplan Connect 1.4.3 Export Process.
My hunch is that, maybe it's related to Java -- I have this Java version on my Control Panel:
===============================================
Currently, I have the below basic export script:
@echo off
set AnaplanUser='username:password'
set WorkspaceId='my workspace ID'
set ModelID='my model ID'
set Operation=-service 'https://api.anaplan.com' -auth 'https://auth.anaplan.com' -export 'ACHFM001'
-execute -get 'C:\Users\jspas\Desktop\ANAPLAN CONNECT\anaplan-connect'
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%
pause
===============================================
I am getting this error when I run the script:
'-execute' is not recognized as an internal or external command,
operable program or batch file.
'-workspace' is not recognized as an internal or external command,
operable program or batch file.
.\AnaplanClient.bat -user 'my username:password'
Absolute path to JAVA 8 or Java 11 or OpenJDK8 executable not provided. Will attempt to figure out path from JAVA_HOME or Windows registry...
JAVA_HOME is not defined, will attempt to fetch value from registry...
Checking Windows Registry for Java Version...
Checking Windows Registry for JAVA_HOME...
JAVA_HOME is C:\Program Files\Java\jre1.8.0_241
Found Java executable from JAVA_HOME "", at C:\Program Files\Java\jre1.8.0_241\bin\java.exe...
Current Java version = 1.8
Current Java version is valid for Anaplan Connect.
Running Anaplan Connect...
Using Class-Path: C:\Users\jspas\Desktop\ANAPLAN CONNECT\anaplan-connect\anaplan-connect-1.4.3-jar-with-dependencies.jar
2020-01-30 15:43:12 ERROR 3864 |-- Options are:
General:
--------
(-h|-help): display this help
(-version): display version information
(-d|-debug): Show more detailed output
(-q|-quiet): Show less detailed output
Connection:
-----------
(-s|-service) <service URI>: API service endpoint (defaults to https://api.anaplan.com/)
(-u|-user) <username>[:<password>]: Anaplan user name + (optional) password
(-auth|-authServiceUrl) <Auth Service URL>: Anaplan SSO server.(-c|-certificate) <CA certificate filepath>: Path to user certificate used for authentication (an alternative to using a key store)
(-pkey|-privatekey) <privatekey path>:<passphrase>: Path to user privatekey used for authentication (an alternative to using a key store) + passphrase
(-k|-keystore) <keystore path>: Path to local key store containing user certificate(s) for authentication
(-kp|-keystorepass) <keystore password>: Password for the key store (if not provided, password is read from obfuscated file 'C:\Users\jspas\Desktop\ANAPLAN CONNECT\anaplan-connect\.anaplan\api-client\keystore-access.txt', or prompted for)
(-ka|-keystorealias) <keystore alias>: Alias of the public certificate in the specified key store
(-v|-via) <proxy URI>: use specified proxy
(-vu|-viauser) [<domain>[\<workstation>]\]<username>[:<password>]: use proxy credentials
(-mrc|-maxretrycount): Max retry count for API calls
(-rt|-retrytimeout): Retry timeout for Http client calls
(-ct|-httptimeout): Http client connection timeout
Workspace Contents:
-------------------
(-w|-workspace) (<id>|<name>): select a workspace by id/name
(-m|-model) (<id>|<name>): select a model by id/name
(-F|-files): list available server files in selected model
(-f|-file) (<id>|<name>): select a server file by id/name
(-ch|-chunksize): upload chunk-size number, defaults to 1048576.
Data Transfer:
--------------
(-g|-get) <local path>: Download specified server file to local file
-gets Write specified server file to standard output
-getc Write tab-separated server file to standard output
(-p|-put) <local path>: Upload to specified server file from local file
-puts Upload to specified server file from standard input
-putc Upload to specified server file from tab-separated standard input
Server Actions:
---------------
(-I|-imports): list available imports in selected model
(-i|-import) (<id>|<name>): select an import by id/name
(-E|-exports): list available exports in selected model
(-e|-export) (<id>|<name>): select an export by id/name
(-A|-actions): list available actions in selected model
(-a|-action) (<id>|<name>): select an action by id/name
(-P|-processes): list available processes in selected model
(-pr|-process) <id/name>: select a process by id/name
(-xl|-locale) <locale> Specify locale (eg en_US) to perform server opertion
(-xc|-connectorproperty) [(<source>|<type>)/]property:(value|?):
specify import data source connection property
(-xm|-mappingproperty) [(<import id>|<import name>)/]dimension:(value|?):
specify prompt-at-runtime import mapping value(-x|-execute): Run the selected import/export/action/process
Action Information:
-------------------
(-o|-output) <local path>: Retrieve dump file(s) for completed import/process
-emd: Describe layout of an export (metadata)
JDBC:
-----
-loadclass <class name>: Load a Java class
-jdbcproperties: Path to JDBC properties file.
Press any key to continue . . .
===============================================
Thanks a lot! 🙂
Best Answers
-
set Operation=-service https://api.anaplan.com -auth https://auth.anaplan.com -export ACHFM001
set Operation=%Operation% -execute -get "C:\Users\jspas\Desktop\ANAPLAN CONNECT\anaplan-connect"Note that what follows -get should be a file path, not a directory. Also Command is split:
set Command=.\AnaplanClient.bat %Credentials%
set Command=%Command% -workspace %WorkspaceId% -model %ModelId% %Operation%0 -
Thank you for all your feedback.
I was able to run the script successfully.
In addition to the helpful comments...
- I needed to specify a path which served as the destination of my exported files -- this was where the -get command placed the exported files.
- I needed to include the filename inside the destination path and also added it on the script, and since I wanted it in excel, I had to make sure it had .xls as the file extension.
Here's the revised script that worked:
@echo off
set AnaplanUser="username:password"
set WorkspaceId="******"
set ModelID="******"
set Operation=-service "https://api.anaplan.com" -auth "https://auth.anaplan.com" -export "ACHFM001"
set Operation=%Operation% -execute -get "C:\Users\jspas\Desktop\ANAPLAN CONNECT\Anaplan Connect Export Destination\ACHFM001.xls"
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%
pauseThanks a lot!
Jonathan
1
Answers
-
Anaplan Connect Supports Java 8 and it seems you are already updated on that. Can you please check if your script is in the same directory as Anaplan Client.bat. Also can you use double quotes instead of single quotes and see if that fixes the issue
Thanks,
Misbah
0 -
I suspect that the text editor you used to edit the script has broken the command line into two (word wrap). Most editors will allow you to turn word wrap off, or you can append parts together using set Operation=%Operation% ..., or you can use a caret('^') at the end of a line to tell the command interpreter to join it with the next.
0 -
Thanks for the feedback, @ben_speight
I tried replacing the "Operation" by "Operation=%Operation% ...", it's still the same.
I also tried putting "^" at the end of the "set Operation=-service "https://api.anaplan.com" -auth "https://auth.anaplan.com" -export "ACHFM001"" line, but it still did not work.
Thanks,
Jonathan
0