Guide to using the Assets module in the AIH.CLI tool
#
PurposeThis guide is designed to facilitate users in bulk importing assets 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.
#
Exporting the Assets dataThe command for exporting the Assets data from AIH system is structured as follows:
AIH.CLI assets 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 OptionsTo 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 MainSystems data into "MainSystems" worksheet, use the following command:
AIH.CLI assets export --only mainsystem <path-to-file>
#
Importing the Assets dataThe command to import the Assets data into the AIH system is structured as follows:
AIH.CLI assets 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 assets data is visible.
Note: For importing MainSystems into the AIH as it require the ObjectOwner field, it is crucial to set this field as an environment variable (name - objectOwnerId
) in the import command. 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 assets 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 assets import
#
Import OptionsTo 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 "Plants" worksheet, use the following command:
AIH.CLI assets import --only plant <path-to-file>
#
Preparing the Assets data for import#
1) Prepare organizationThe table to import the Organizations into "Asset Integrity Hub/Asset Data Hub" should contain the following columns:
Id | Name | OrganizationType | MainPhone | OtherPhone | Website | PrimaryContact | Country | Region | City | PostalCode | Street1 | Street2 | Latitude | Longitude | ObjectOwner | Property |
---|
Id : string A unique identifier. If this field is left blank the system will generate an id when importing.
This Id can be generated at random e.g. a Globally Unique Identifier. This should look as follows: '167cdcff-d782-4e4a-a895-663d119c7070'.
Name (required): string
The name of the organization.
ObjectOwner (required): string
Here the one creating the organization can be defined. This is usual an email address. The email needs to be registered in the environment you are importing to.
Property To link additional properties to organization, you should define the column name using the following format:
Property: {property name}
The other columns are self explanatory and optional.
#
2) Prepare plantThe table to import the Plants into "Asset Integrity Hub/Asset Data Hub" should contain the following columns:
Id | Name | Operator | Owner | Latitude | Longitude | Country | Region | ProjectCode | ProjectNumber | Type | City | PostalCode | Street1 | Street2 | OperationalSince | ObjectOwner | Property |
---|
Id : string A unique identifier. If this field is left blank the system will generate an id when importing.
This Id can be generated at random e.g. a Globally Unique Identifier. This should look as follows: '167cdcff-d782-4e4a-a895-663d119c7070'.
Name (required) : string
The name of the plant.
ProjectCode (required) : string The project code of the plant.
ObjectOwner (required) : string Here the one creating the plant can be defined. This is usual an email address. The email needs to be registered in the environment you are importing to.
Property To link additional properties to plant, you should define the column name using the following format:
Property: {property name}
The other columns are self explanatory and optional.
#
3) Prepare Main systemsThe table to import the MainSystems into "Asset Integrity Hub/Asset Data Hub" should contain the following columns:
Id | Plant | Name | Design | DesignVersion | Instance | Parameter | SerialNumber | Type | Manufacturer | Series | Operator | Owner | OperationalSince | Street1 | Street2 | City | PostalCode | Country | Region | DateOfManufacture | StartOfWarranty | EndOfWarranty | Latitude | Longitude | Property |
---|
Id : string A unique identifier. If this field is left blank the system will generate an id when importing.
This Id can be generated at random e.g. a Globally Unique Identifier. This should look as follows: '167cdcff-d782-4e4a-a895-663d119c7070'.
Name (required) : string The name of the main system.
ObjectOwner (required) : string Here the one creating the main system can be defined. This is usual an email address. The email needs to be registered in the environment you are importing to.
Parameter For enabling design's parameters for main system you need to define columns with the following way:
Parameter:{parameter name}
Values can only be "Yes" or "No," indicating whether the parameter is enabled or not. For instance:
Column name - Parameter:Yaw motor Value - Yes
Property To link additional properties to main system, you should define the column name using the following format:
Property: {property name}
The other columns are self explanatory and optional.
#
4) Prepare EquipmentThe table to import Equipment into "Asset Integrity Hub/Asset Data Hub" should contain the following columns:
Id | Name | Manufacturer | Operator | Owner | Plant | MainSystem | Type | Series | ItemNumber | InventoryNumber | SerialNumber | Gtin | DateOfManufacture | DateOfInstallation | StartOfWarranty | EndOfWarranty | DesignObject | ObjectOwner | Property |
---|
Id : string A unique identifier. If this field is left blank the system will generate an id when importing.
This Id can be generated at random e.g. a Globally Unique Identifier. This should look as follows: '167cdcff-d782-4e4a-a895-663d119c7070'.
Name (required) : string
The name of the equipment.
ObjectOwner (required) : string Here the one creating the equipment can be defined. This is usual an email address. The email needs to be registered in the environment you are importing to.
Property To link additional properties to equipment, you should define the column name using the following format:
Property: {property name}
The other columns are self explanatory and optional.