Skip to main content

Guide to using the Designations module in the AIH.CLI tool

Purpose#

This guide is designed to facilitate users in bulk importing designations information into the Asset Integrity Hub via the AIH.CLI (see details) tool. Primarily, it focuses on assisting users in properly structuring and formatting their data for successful import.

To maintain consistency in the data format, it is recomended to export existing data before incorporating new entries. Additionally, within the exported Excel file, you will find an "Introduction" worksheet. This section provides detailed descriptions of the various columns that can be included in your data worksheets, offering guidance on how to enhance your data structure.

Exporting the Designations data#

The command for exporting the Designations data from AIH system is structured as follows:

AIH.CLI designations export <option> <path-to-file>

In this command:

  • <option> may be used to specify additional export options.
  • <path-to-file> is a placeholder that you need to replace with the actual file path where you want the exported .xlsx file to be stored.

Export Options#

To export a specific worksheet, the --only option can be used, followed by the name of the worksheet targeted for the export. For example, to export only the Structures data into "Structures" worksheet, use the following command:

AIH.CLI designations export --only structure <path-to-file>

Importing the Designations data#

The command to import the Designations data into the AIH system is structured as follows:

AIH.CLI designations import <option> <path-to-file>

In this command:

  • <option> may be used to specify additional import options.
  • <path-to-file> is a placeholder that you need to replace with the actual file path containing the data you wish to import.

To verify the success of your import, navigate to the Asset Integrity Hub and check if your new or updated designations data is visible.

Note: For importing new objects into the AIH that require the ObjectOwner field, it is crucial to set this field as an environment variable (name - objectOwnerId) in the import command. Within the Designations module, the ObjectOwner field is mandatory for the following entities:

  • Design
  • Structure

To set the ObjectOwner's id as an environment variable, prepend the import command with the following line to define the environment variable. This ensures that the ObjectOwner's id is correctly set before executing the import command:

set "objectOwnerId=<guid>" && AIH.CLI designations import <path-to-file>

Note: Instead of specifing <path-to-file> in the import command, you can use an environment variable named fileId. This variable represents the file's id, which is used to reference a specific file stored in the Files API.

set "fileId=<guid>" && AIH.CLI designations import

Import Options#

To import data from a specific worksheet, you can utilize the --only option followed by the name of the worksheet you wish to import. For instance, to import data exclusively from the "Structures" worksheet, use the following command:

AIH.CLI designations import --only structure <path-to-file>

The --from option allows you to specify the starting line for the import process. When used, the import will begin from the line number provided. For instance, to import data starting from the 4th line of the "Structures" worksheet, use the following command:

AIH.CLI designations import --only structure --from 4 <path-to-file>