Wiki

Options

New Case Case Status
Log In

Wiki

Options

 
Knowledge Base Articles»KB100006 - EtaPRO Asset Tool
  • RSS Feed

Last modified on 9/10/2019 10:17 AM by User.

KB100006 - EtaPRO Asset Tool

Overview

The EtaPRO APR AssetTool is an internal command line utility that can be used to manipulate EtaPRO APR Assets.  It is intended for use by system administrators with an expert level understanding of EtaPRO APR.  The AssetTool is not intended for use by casual users who are unfamiliar with the operation of EtaPRO or the use of command line utilities.

Usage

To use the tool, open a command prompt window and navigate to the directory where the tool is located.  Type the name of the tool followed by the command and options to be executed. List of available commands are:

Command

Description

list

List the assets in an EtaPRO server database.

convert

Converts 3rd party asset files to EtaPRO APR assets.

download

Downloads an APR asset from EtaPRO to an APR asset file.

upload

Uploads an APR asset file to EtaPRO.

adddata

Adds data to an APR asset.

deletedata

Delete data from an APR asset.

excludedata

Excludes data contained in an APR Asset.

importdata

Imports data contained in a CSV file into an APR asset.

retrievedata

Retrieves existing data contained within an APR asset.

addasset

Adds APR assets to EtaPRO from data in a CSV file.
modifyasset

Modifies APR assets in EtaPRO from data in a CSV file.

addpoint

Adds points to an APR asset in EtaPRO from data in a CSV file.

modifypoint

Modifies points in an APR asset from data in a CSV file.

listpoints

Creates CSV files with point lists for APR assets.

filterdata Filters value sets for assets from data in a CSV file.

 

A listing of commands can obtained by passing the tool the “-?” argument is shown in the following figure.

 

Arguments for a command can be obtained by passing the command along with the “-?” argument as shown below.  Arguments will also be shown whenever invalid syntax is used.

 

Single letter shortcut arguments are specified with a single dash (“-“).  Full word arguments are specified with a double dash (“—“). If a sting is passed to the tool that contains spaces, the string must be surrounded in double quotes.

 

Commands

List Command

 The list command can be used to retrieve a list of assets contained in an EtaPRO database.   The arguments for the list command are:

 

Argument

Description

-d or --unit

Specifies the unit designation associated with the assets

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, a default of 5575 is used.

--online

Switch that limits the displayed options to online assets.  Cannot be combined with --all, --public, or –user.

--all

Switch that forces all asset to be listed.  Cannot be combined with –online, --user, or –public.

--public

Switch that forces only public assets to be displayed.  Cannot be combined with –online, --all or –user.

 

Example 1 – List All APR Assets

 

Example 2 – List All Online APR Assets

 

Convert Command

The convert command converts Smart Signal Microsoft Access files into EtaPRO APR assets.  The tool automatically adds points that are missing from the EtaPRO Server.  This command is currently under development and should be considered experimental.  Therefore, no examples are provided in this document. The arguments for the convert command are:

 

Argument

Description

-d or –unit

Specifies the unit designation associated with the assets

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--source

The source Microsoft Access file containing Smart Signal asset data.

 

Download Command

 The download command downloads one or more APR assets and saves them to files.  The arguments for the download command are:

Argument

Description

-d or --unit

Specifies the unit designation associated with the assets

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--dir

Specifies a directory where downloaded files should be placed.  If it is not provided, the files are placed in the same directory as the AssetTool utility.

--all

Downloads the latest revision of all APR assets in the EtaPRO database.  Do not provide a unit number if using this command.  Warning: This command may take an extremely long time to run and will consume significant bandwidth while running. 

--d or –unit

Unit designations associated with the assets being downloaded.  If provided without an asset name, all assets for the unit are downloaded.  Warning:  Downloading all asset for a unit can take a long time and will consume significant bandwidth while running.

-n or –name

Limits the download to an asset with a specific name.  A unit must be provided along with the asset name.

 

Example 3 – Download a Single Named Asset

Example 4 – Download All Assets for a Unit

 

Example 5 – Download All Assets in an EtaPRO Asset Database

 

Upload Command

 The upload command uploads an Asset File to the EtaPRO database.  The arguments for the upload command are:

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--d or –unit

Unit designations associated with the assets being upload.  If a unit designation is provided, an asset name must also be provided.  If an asset name and unit are provided, the asset is created as a new asset.

-n or –name

The name of the asset to be stored in the EtaPRO database.  The name must be unique and must not already exist in the database.  If an asset name and unit are provided, the asset is created as a new asset.

--file

The Asset file to be uploaded to the database.

-description

Description to be stored in the database with the Asset.

-notes

Notes to be stored in the database with the Asset.

--compact

Forces data in the asset to b compacted before being uploaded.

--user

Stores the asset as a user asset instead of a public asset.  If the user is not an administrator, the Asset will be saved as a user asset.

--addpoints

Add points that do not exist in EtaPRO.

 

Example 6 – Upload an Asset File as a New Revision to an Existing Asset

 

Example 7 – Upload an Asset File as a New User Asset, Compact before Uploading

Example 8 – Upload an Asset File as a New User Asset, Add data points to EtaPRO

AddData Command

 The adddata command adds historical data to an asset.  The asset may be located in the EtaPRO database or in a file.  If the Asset is in a file, it must also exist in the EtaPRO database.  Data is retrieved from whatever historian type is affiliated with the EtaPRO server.   If bad quality data is acquired, it is excluded from the asset.

Arguments for the add data command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

-f or –file

Asset filename, if a filename is provided, a unit designation and asset name should not be provided.

-d or --unit

Specifies the unit designation associated with the assets.  If a unit designation is provided, an asset name must also be provided.  Do not provide a filename if referring to an asset in the EtaPRO database.

-n or –name

The name of the asset in the EtaPRO database.  If a name is provided, a unit designation must also be provided.

-s or –start

Start time for the period to be retrieved.

-e or –end

End time for the period to be retrieved.

-I or –increment

Increment in seconds nn datasets to be added.

 

Example 9 – Update an Asset File with Historical One Hour Historical Data

  

 

Example 10 – Update an Asset in the Database with One Hour Historical Data

  

 

DeleteData Command

 The deletedata command deletes data in an asset for a specified period of time.  The asset can be located in the database or in a file. 

Arguments for the deletedata command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

-f or –file

Asset filename, if a filename is provided, a unit designation and asset name should not be provided.

-d or --unit

Specifies the unit designation associated with the assets.  If a unit designation is provided, an asset name must also be provided.  Do not provide a filename if referring to an asset in the EtaPRO database.

-n or –name

The name of the asset in the EtaPRO database.  If a name is provided, a unit designation must also be provided.

-s or –start

Start time for the period to be deleted.

-e or –end

End time for the period to be deleted.

 

Example 11– Delete Data between December 1, 2009 and December 15, 2009 for an Asset in the EtaPRO Database

 

 

 

Example 12 – Delete Data between December 1, 2009 and December 15, 2009 from an Asset File

  

 

ExcludeData Command

 The excludedata command excludes data in an asset for a specified period of time.  The asset can be located in the database or in a file.  Excluded data remains in the asset but is excluded from use when generating expected values.

Arguments for the excludedata command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

-f or –file

Asset filename, if a filename is provided, a unit designation and asset name should not be provided.

-d or --unit

Specifies the unit designation associated with the assets.  If a unit designation is provided, an asset name must also be provided.  Do not provide a filename if referring to an asset in the EtaPRO database.

-n or –name

The name of the asset in the EtaPRO database.  If a name is provided, a unit designation must also be provided.

-s or –start

Start time for the period to be deleted.

-e or –end

End time for the period to be deleted.

 

 

Example 13 – Delete Data between December 1, 2009 and December 15, 2009 for an Asset in the EtaPRO Database

 -

 

 Example 14 – Delete Data between December 1, 2009 and December 15, 2009 from an Asset File

  

 

ImportData Command

 The importdata command allow data contained in a CSV (comma separated value) file to be imported into an asset.  The asset can be located in either the EtaPRO asset database or in a file.  

Arguments for the import command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

-f or –file

Asset filename, if a filename is provided, a unit designation and asset name should not be provided.

-d or --unit

Specifies the unit designation associated with the assets.  If a unit designation is provided, an asset name must also be provided.  Do not provide a filename if referring to an asset in the EtaPRO database.

-n or –name

The name of the asset in the EtaPRO database.  If a name is provided, a unit designation must also be provided.

--delimiter

The delimiter used for separating the columns in the csv file.  If omitted a comma is used.

-c or –csvfile

The name/path of the CSV file containing historical data to be added to the Asset.

--header

Flag used to generate a header for the CSV file.

 

A blank CSV file should be created using the --header argument.   After a blank file is created, the user should populate the file with data.   An example creation of a header file is show below.

 

Example 15 – Creating a Blank CSV Header File

 

 

The header file created by the above command appears as follows when opened in Microsoft Excel.

 

 

 The “Unit/Quality” delimiter is used to separate the unit number and point ID’s.  It is also used to separate the value and quality if a point is bad.  The unit/quality delimiter should be changed to another single character if it conflicts with any characters used in EtaPRO point ID’s. 

Any number other than zero will be treated as a bad quality.  An example of the above file populated with data appears as shown below.  The values containing “\-1” are bad.

 

Example 16 An example of adding the data in the above file the asset is provided below.

  

 

Example 17An example of adding the data above to an asset file is shown below.

 

 

 

RetrieveData Command
 
 The retrievedata command retrieves data from an asset into a CSV (comma separated value) file.  The asset can be located in either the EtaPRO asset database or in a file.
 

Argument

Description

-d or --unit

Specifies the unit designation associated with the assets

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--dir

Specifies a directory where downloaded files should be placed.  If it is not provided, the files are placed in the same directory as the AssetTool utility.

--d or –unit

Unit designations associated with the assets being downloaded.  If provided without an asset name, all assets for the unit are downloaded.  Warning:  Downloading all asset for a unit can take a long time and will consume significant bandwidth while running.

-n or –name

Limits the download to an asset with a specific name.  A unit must be provided along with the asset name.

-c or –csvfile The path of the CSV file where the retrieved asset data will be saved to. If it is not provided, the file is placed in the same directory as the AssetTool utility.
--delimiter The delimiter used for separating the columns in the csv file.  If omitted a comma is used.
-s or –start Start time for the period to be retrieved. Both Start and End times should be specified. If both Start and End times are omitted all data is retrieved.
-e or –end End time for the period to be retrieved. Both Start and End times should be specified. If both Start and End times are omitted all data is retrieved. 
--excluded Specifies whether Excluded or Included data is retrieved. If set to True Excluded data is retrieved only. If omitted, a default of False is used and Included data is retrieved only.

 

Example 18 – Retrieve Data between November 2, 2015 and November 13, 2015 for an Asset in the EtaPRO Database.

 

Example 19Retrieve all Excluded Data from an Asset File.

 

AddAsset Command

 The addasset command allows a new asset to be created in EtaPRO from data contained in a CSV (comma separated value) file.  The asset will be created in the EtaPRO Asset Database as a public asset by default.  

Arguments for the addasset command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--delimiter

The delimiter used for separating the columns in the csv file.  If omitted a comma is used.

-c or –csvfile

The name/path of the CSV file containing information about the assets to be added.

--header

Flag used to generate a header for the CSV file.

--headerfile

Flag used to specify an alternative file for the header.

 

A blank CSV file should be created using the --header argument.   After a blank file is created, the user should populate the file with data.   An example creation of a header file is show below.

 

Example 15 – Creating a Blank CSV Header File

 

 

The header file created by the above command appears as follows when opened in Microsoft Excel.

 

 

 For each asset that should be created, fill out a new row below the created headers.  Only the columns with a "Required" designation require a value to be entered, but it is strongly recommended to enter relevant information for all headers.

An example of a properly filled out header file can be found below.

 

 

Example 16 An example of adding the asset in the above file to the EtaPRO Asset Database.

  

ModifyAsset Command

 The modifyasset command allows an existing asset in EtaPRO to be modified from data contained in a CSV (comma separated value) file.

Arguments for the modifyasset command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--delimiter

The delimiter used for separating the columns in the csv file.  If omitted a comma is used.

-c or –csvfile

The name/path of the CSV file containing information about the assets to be modified.

--header

Flag used to generate a header for the CSV file.

--headerfile

Flag used to specify an alternative file for the header.

 

A blank CSV file should be created using the --header argument.   After a blank file is created, the user should populate the file with data.   An example creation of a header file is show below.

 

Example 15 – Creating a Blank CSV Header File

 

 

The header file created by the above command appears as follows when opened in Microsoft Excel.

 

 

 For each asset that should be modified, fill out a new row below the created headers.  Only the columns with a "Required" designation require a value to be entered, but it is strongly recommended to enter relevant information for all headers.

An example of a properly filled out header file can be found below.

 

Example 16 An example of modifying the asset as specified in the above file the asset is provided below.

  

 

AddPoint Command

 The addpoint command allows for points to be added to APR assets in EtaPRO from data contained in a CSV (comma separated value) file.  

Arguments for the addpoint command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--delimiter

The delimiter used for separating the columns in the csv file.  If omitted a comma is used.

-c or –csvfile

The name/path of the CSV file containing information about the points to be added.

--header

Flag used to generate a header for the CSV file.

--headerfile

Flag used to specify an alternative file for the header.

 

A blank CSV file should be created using the --header argument.   After a blank file is created, the user should populate the file with data.   An example creation of a header file is show below.

 

Example 17 – Creating a Blank CSV Header File

 

 

The header file created by the above command appears as follows when opened in Microsoft Excel.

 

 

 For each point that should be added, fill out a new row below the created headers.  Only the columns with a "Required" designation require a value to be entered, but it is strongly recommended to enter relevant information for all headers.

An example of a properly filled out header file can be found below.  This file will both create a new EtaPRO point, and then add it and an already existing EtaPRO point to the asset.

 

Example 18An example of adding the points in the above file to the matched asset is provided below.

  

ModifyPoint Command

 The modifypoint command allows for points in EtaPRO Assets to be modified from data contained in a CSV (comma separated value) file.  

Arguments for the modifypoint command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--delimiter

The delimiter used for separating the columns in the csv file.  If omitted a comma is used.

-c or –csvfile

The name/path of the CSV file containing historical data to be added to the Asset.

--header

Flag used to generate a header for the CSV file.

--headerfile

Flag used to specify an alternative file for the header.

 

A blank CSV file should be created using the --header argument.   After a blank file is created, the user should populate the file with data.   An example creation of a header file is show below.

 

Example 19 – Creating a Blank CSV Header File

 

 

The header file created by the above command appears as follows when opened in Microsoft Excel.

 

 

 For each point that should be modified, fill out a new row below the created headers.  For any of the named columns in the modify point command, a value is expected.  If any columns should be omitted and left unchanged, the column header and its respective column should be deleted from the header file.  Any of the remaining numeric parameters must have a value entered, or data for the row will not be read.  String parameters, such as the Detail fields or the Generic ID, can be left empty if desired.

An example of a properly filled out header file can be found below.

 

Example 20An example of modifying the points in the above file is provided below.

  

 

ListPoints Command

 The listpoints command allows CSV (comma separated value) files containing point lists for EtaPRO APR assets to be generated from data contained in a CSV header file.

Arguments for the listpoints command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--delimiter

The delimiter used for separating the columns in the csv file.  If omitted a comma is used.

-c or –csvfile

The name/path of the CSV file containing historical data to be added to the Asset.

--header

Flag used to generate a header for the CSV file.

--headerfile

Flag used to specify an alternative file for the header.

 

A blank CSV file should be created using the --header argument.   After a blank file is created, the user should populate the file with data.   An example creation of a header file is show below.

 

Example 21– Creating a Blank CSV Header File

 

 

The header file created by the above command appears as follows when opened in Microsoft Excel.

 

 

 For each asset that should output a point list file, fill out a new row below the created headers.  Only the columns with a "Required" designation require a value to be entered, but it is strongly recommended to enter relevant information for all headers.

An example of a properly filled out header file can be found below.

 

Example 22An example of creating a point list from the data in the above file is provided below.

  

 

An example of a point list generated using this method can be found below.  This contains all variables necessary to use the modifypoint command, allowing this data to be copied over into a new modifypoint header.

 

FilterData Command

 The filterdata command allows for value sets in an EtaPRO asset to be filtered above or below a provided value from data contained in a CSV (comma separated value) file. 

Arguments for the filterdata command are: 

Argument

Description

-u or –username

Specifies the user name to use when connecting to EtaPRO (Not required for Windows authentication).

-p or –password

Specifies the password to use when connecting to EtaPRO (Not required for Windows authentication).

-a or –address

Address of server to connect to.  If omitted, 127.0.0.1 (localhost) is used.

--port

TCP port for server.  If omitted, 5575 is used.

--delimiter

The delimiter used for separating the columns in the csv file.  If omitted a comma is used.

-c or –csvfile

The name/path of the CSV file containing historical data to be added to the Asset.

--header

Flag used to generate a header for the CSV file.

--headerfile

Flag used to specify an alternative file for the header.

 

A blank CSV file should be created using the --header argument.   After a blank file is created, the user should populate the file with data.   An example creation of a header file is show below.

 

Example 23– Creating a Blank CSV Header File

 

 

The header file created by the above command appears as follows when opened in Microsoft Excel.

 

 

 For each valueset that should be filtered, fill out a new row below the created headers.  Only the columns with a "Required" designation require a value to be entered, but it is strongly recommended to enter relevant information for all headers.  The "Direction" parameter will exclude values either above or below the provided Value.  Use a value of "TRUE" to filter above, or a value of "FALSE" to filter below.

An example of a properly filled out header file can be found below.

 

Example 24 An example of adding the data in the above file the asset is provided below.