Run the Gateway from the Command Line
- Last UpdatedOct 31, 2025
- 5 minute read
You can run the Gateway from the command line.
Note: When you run the Gateway from command line, all processing messages are directed to the log file. This allows you to use the command prompt in batch mode, without waiting for the Gateway to complete the execution.
All the logs before project execution (such as command line parameters validation logs or project configuration file load logs) are logged into the default log location:
C:\Users\<username>\AppData\Roaming\AVEVA\AVEVA Gateway for 1D Data\Logs\1DDataGateway_Log_<GUID>.txt
The logs during project execution are written separately to the log folder as defined by you either from command line or in the configuration file.
Note: A log file is generated for each input file.
At the command line, type the following:
"C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" <-cp> <-in> <-o> <-op> <-lp> <-extcp> <-trnsfcp> <-ldrcp> <-context> <-ma> <-ma> <-timeout> <-sepproc>
where the parameters are listed as follows:
|
Command Line Parameter |
Description |
|---|---|
|
-cp <project configuration file path> |
(mandatory) Project configuration file path, for example, "C:\Doc Gateway Training\Example Config.xml". |
|
-op <output folder path> |
(optional) Output folder path for all the the output EIWM/CSV files. |
|
-in <input file/folder path> |
(optional) Input file/folder path for the input files. Note: This option cannot be used to select the input present in S3 bucket or in ACS. |
|
-o <new output filename> |
(optional) Sets the new filename for the output EIWM file. |
|
-lp <log folder path> |
(optional) Log folder path. |
|
-extcp <configuration file path for Extract configuration> |
(optional) Configuration file path of Extract configuration. |
|
-trnsfcp <configuration file path for Transform configuration> |
(optional) Configuration file path of Transform configuration. |
|
-ldrcp <configuration file path for Load configuration> |
(optional) Configuration file path of Load configuration. |
|
-context <project context> |
(optional) Sets the context for EIWM objects. |
|
-ma <manifest attribute name1>:<manifest attribute value1> |
(optional) Allows the passing of a manifest attribute value from the command line. You can specify any number of manifest attributes with this syntax through command line. |
|
-ma <manifest attribute name2>:<manifest attribute value2> |
(optional) Allows the passing of a manifest attribute value from the command line. |
|
-timeout <timeout integer value> |
(optional) Sets the maximum allowed processing time (in minutes). Valid values: any positive integer, where a value of “0” means no timeout applies |
|
-sepproc < separate processing value> |
(optional) Sets whether ETL is a separate process to the configuration read and logging process. Valid value: “true” or “false”. |
Notes:
-
Any optional parameter used at the command line takes priority over the equivalent configuration in the project configuration file. This is done without overwriting the value in the project configuration file.
-
The Gateway validates the command line syntax and the contents of configuration files. If any errors are detected, processing will be terminated and the relevant message will be displayed on the console.
-
Because the Gateway supports more than one type of extraction source, if the input path parameter contains only the folder name, then all files in that folder and its subfolders having the same type of extractor(s) configuration will be processed. For example, if the Excel and CSV extractors have been configured, then all file types .xlsx, .xls, and .csv will be processed.
-
When -sepproc true is specified, the application will launch a child process for each input file or batch, improving isolation and fault tolerance. If invalid, an error is thrown.
-
If a valid -timeout is set and reached, then
-
If -sepproc is false, the entire Gateway process stops and status is marked Timeout. If invalid, an error is thrown.
-
If -sepproc is true, the timeout applies to the child process that is executing the Extract, Transform and Load functions. This means that if processing a folder of files, the timeout applies to each file’s processing, not to the entire folder’s processing. For example, if -timeout "1" and -sepproc "true" are used, each file in the folder will be given 1 minute to complete in its own process.
-
Examples:
-
With only project configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml"
-
With project configuration file and input file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -in "D:Test2\Input\Excel\EqList.xls"
-
With project configuration file new_1.xml, input file EqList.pdf and the new output EIWM filename NewEqlist.pdf written to the output folder, defined in the configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D: \Test\new_1\new_1.xml" -in "D:Test2\Input\PDF\EqList.pdf" -o "NewEqlist"
-
With project configuration file and output folder: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -op "D:\Test\new_2\Output" Generates output in the Output Path provided from command line "D:\Test\new_2\Output"
-
With project configuration file and logs folder: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For Tabular Data\AVEVA.Gateways.TabularData.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -lp "D:\Test\Logs" Generates logs in the Logs Path provided from command line "D:\Test\Logs"
-
With project configuration file and Extract configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -extcp "D: Test\new_2\Configurations\ExtractorConfiguration.xml" Takes Extractor Configuration file from command line parameter "D:\Test\new_1\new_1.xml" -extcp "D: \Test\new_2\Configurations\ExtractorConfiguration.xml"
-
With project configuration file and Transform configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -trnsfcp "D:\Test\new_2\Configurations\TransformerConfiguration.xml" Takes Transformer Configuration file from command line parameter "D:\Test\new_1\new_1.xml" -extcp "D: \Test\new_2\Configurations\TransformerConfiguration.xml"
-
With project configuration file and Load configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -ldrcp "D:\Test\new_2\Configurations\LoaderConfiguration.xml" Takes Loader Configuration file from command line parameter "D:\Test\new_1\new_1.xml" -extcp "D:\Test\new_2\Configurations\LoaderConfiguration.xml"
-
With project configuration file and project context: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -context "XXX|YYY|ZZZ" updates context in EIWM output file from command line parameter "XXX|YYY|ZZZ"
-
With project configuration file and manifest attributes: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -ma "#MODEL_NAME#:My Output"
-
With project configuration file and timeout: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -timeout “1”
-
With project configuration file, timeout and separate process: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 1D Data\AVEVA.Gateways.Data1D.GUI.exe" -cp "D:\Test\new_1\new_1.xml" -timeout “1” -sepproc “true”
Notes:
-
You need to fill all mandatory fields in the configuration file such as project name and project path.
-
If the project configuration file is incorrect, command line prompt throws an exception stopping the execution process.
Example:
-
Project paths such as extractor config path, loader config path, transform config path, input path, log path and output path mentioned in the project configuration file must be valid. Otherwise, the execution of the configuration file stops.
Output path scenarios are as follows:
-
If you provide an output path in the command line, then the provided path is the final output path. If you do not provide any output path, then the output path mentioned in the config file is taken as the default output path.
-
If the Output path provided by you is valid, then a check is conducted to determine whether the output path exists or not. If the output path does not exist, then a directory is created in that provided path and the output files are generated there.
-
If you provide an invalid output path format, then the command line shows an exception message showing the invalid output path.
-
Exit Codes:
The following command line exit codes are defined for AVEVA.Gateways.Data1D.GUI.exe.
|
Exit Code |
Definition |
|---|---|
|
0 |
Success |
|
1 |
Gateway processing stopped because of general error |
|
3 |
Gateway processing canceled |
|
7 |
Processing failed in extractor |
|
9 |
Processing failed in transformer |
|
13 |
Processing failed in EIWM loader |
|
17 |
Processing failed due to no input files |
|
18 |
File processing stopped due to timeout |
|
19 |
Processing failed in CSV loader |
|
1000 |
Gateway processing failed |
Note: The exit code returned from the Gateway can be captured in the %errorlevel% variable when executed in batch mode.