CARIS HPD : HPD® User Guide : Loading Data : Batch Script
 

Batch Script

- NOT VERIFIED change to Not Verified in script example on next page

You can create or modify load scripts to import data

The basic script syntax is shown below.

"C:\Program Files\CARIS\HPD\<version>\Bin\caris_hpd_loader.exe"-l <user_name>/<password>@<database> -f <file_to_load> -u "<usage_name>"-c "<certification_status>" -p <project_id_number> -g "<log_file_name>" -o <load_object_name> -w "<workspace_name>"

caris_hpd_loader is the data loader program. This program is found in C:\Program Files\CARIS\HPD\<version>\Bin.

Parameters for loading data are shown below. Mandatory parameters are listed in the same order as in the syntax example.

Parameters

Description

Mandatory

-l
(lower-case L)

Login information.

The format of the input is <user_name>/<password>@<database>.

-f

Input HOB, ENC or DNC file.

-u

Usage on which data will be loaded. The usage name is case-sensitive.

-c

Certification status that features will be assigned, either Verified, Accepted, Not Verified, or Under Construction.

-p

Project ID for the load.

-o

Required metaobject for load. Each run will assign features to a unique metaobject. The metaobject name is case-sensitive.

Optional

-a

Global attribute entry (these attributes will be assigned to ALL features loaded). The format of the input for attributes 1 through n is:

<attribute_1>:<value_1>;...;<attribute_n>:<value_n>

-g

Log file. If no file name specified, then HPDLoader.log is created in the current directory.

-h

Show help information.

-i

Name of the complex filter that is created in the HPD Editors.

-n

Assign a new FOID if one is missing, or if the feature contains a conflicting or invalid FOID. This option cannot be used with -r.

-r

Override the existing FOID and assign new FOID to each feature. This option cannot be used with -n.

-s

Spatial attributes (these attributes will be assigned to ALL features loaded). The format of the input for attributes 1 through n is:

<attribute_1>:<value_1>;...;<attribute_n>:<value_n>

-v

Verbose logging of the load process. This option adds additional information to the log file and can be useful for troubleshooting.

-w

workspace: Create a new workspace automatically.

-extfile dir

The location of external files.

-requireall

Cancel the load unless all features can be loaded.

-shiftDepth

Datum depth values are shifted by this value. A minus sign indicates that the depth is being revised upwards.

-shiftHeight

Datum height values are shifted by this value. A minus sign indicates that the height is being revised upwards.

The following rules are applied to the batch file:

• Options are not case-sensitive.

• Order of the options is not important.

• Values with spaces must be enclosed in quotation marks (“Like This”).

• Values can be abbreviated provided they are still uniquely identifiable by the loader. For example, “Approach” can be used instead of the full usage name, which might be “Approach(5000-34999)”.

Example of a batch file:

"C:\Program Files\CARIS\HPD\<version>\Bin\caris_hpd_loader.exe" -l hpd_dba/password@hydrodb -f coastline.hob -u "Approach(5000-34999)" -c -p 4 -g “Coastline_Load.txt” -o coastline -w “Coastline Central Area”

When the batch file is run with the above values, the following actions occur:

• The program is run as the HPD user account hpd_dba with password password.

• The features in coastline.hob are loaded into the Approach(5000-34999) usage in the hydrodb database.

• The load is associated with the HPD project.

• All loaded features are assigned a certification status of Not Verified.

• A load meta object, called coastline, is created. This object logs the unique feature object identifiers of all features successfully loaded.

• An error log file, Coastline_Load.txt, is generated by the load process in the same folder.

• A new HPD workspace, Coastline Central Area, is created.