Link TMLs to Inspection Task Data Loader
About the Link TMLs to Inspection Data Loader
To create TM scoping on an Inspection Task, you must link the TMLs to the Inspection Task. You can link these records using the Link TMLs to Inspection Task Data Loader.
About the Link TMLs to Inspection Task Data Loader Requirements
Before you use the Link TMLs to Inspection Task Data Loader, you must complete the following steps:
- Ensure that the Inspection Management and Thickness Monitoring modules are deployed.
- Ensure that the following conditions are satisfied:
- In an Inspection Task:
- Task ID must be unique.
- The Related Entity ID field must contain a value.
- In a Thickness Measurement Location:
- TML ID must be unique.
- The TML Asset ID field must contain a value.
Note: Do not link TMLs from nested TML Groups. - In an Inspection Task:
Security Settings:
The Security User performing the data load operation must be associated with either the MI Data Loader User or MI Data Loader Admin Security Role, and must also be associated with the MI Inspection/ MI Thickness Monitoring Inspector Security Group or a Security Role that is associated with this Security Group.
About the Link TMLs to Inspection Task Data Loader General Loading Strategy
- Do not modify the first two rows in the InspectionTasks_To_TMLs worksheet.
- The data loader workbook contains sample data in each column. It is only for your reference. You must remove this data before using the data loader workbook.
- Columns (including columns representing custom fields) in the worksheets should be formatted as Text.
- Import a maximum of 5000 records in each data load.
- It is recommended to use Configuration sheet data provided in the Link TMLs to Inspection Task.xlsx workbook. Do not change the data in the Configuration sheet (except Batch Size).
About the Link TMLs to Inspection Task Data Loader Workbook Layout and Use
To import data using the Link TMLs to Inspection Task Data Loader, APM provides an Excel workbook that must be used to perform the data load.
Worksheet | Description |
---|---|
Configuration | The Configuration worksheet is needed to describe the type of data that you will be loading and how that data should be handled during the data load. |
InspectionTasks_To_TMLs | This worksheet is used to link Inspection Tasks to TMLs. |
Color Coding
Certain columns on the worksheets have different functions and requirements, which are identified by various color codes. The following table lists the colors and what they represent.
Color | Description |
---|---|
Red | Indicates columns that contain values that are required to link records. |
None | Indicates columns in which you can specify custom fields. |
Limitations
- The values that you enter in the data loader workbook are case-sensitive.
- If there are multiple Inspection Tasks with same ID within an asset, TMLs will not be linked to the Inspection Task.
Configuration Worksheet
Field Caption | Field ID | Data Type (Length) | Description |
---|---|---|---|
Data Worksheet ID | DATA_WORKSHEET_ID | Character | Enter the name of the <data> worksheet where the actual data is located. Enter the same name as the <data> worksheet in the data loader workbook. |
Batch Size | BATCH_SIZE | Character | Enter the number of records per batch that you want to data loader to process. Note: The default as well as the recommended batch size is 100. In addition, the log file reports progress by batch. |
Primary Family ID | PRIMARY_FAMILY_ID | Character | Depending on the type of data that you are working with, enter the Relationship Family ID or the Entity Family ID. You can also allow the data in source file to determine the Family ID by enclosing the Field ID that contains the Family ID data in angular brackets (<>). For example, in the <data> worksheet, if there is a column with the ID PRIMARY_FAMILY_ID, where each row contains the corresponding Family ID, then in the Primary Family ID column, enter <PRIMARY_FAMILY_ID>. If the Family ID in the APM metadata contains spaces, then you must use this column. |
Primary Family Key Fields | PRIMARY_FAMILY_KEY_FIELDS | Character | Enter the Field IDs associated with the Primary Family that are used to uniquely identify a record. In case of multiple values, use a pipe character (|) to separate each value. In the case where you are loading data for a relationship family, if key fields are not available or not used, use the <none> constant. If the Primary Action is ACTION_INSERTONLY, you need not specify key fields; you can use the <none> constant. |
Family Type | FAMILY_TYPE | Character | Enter Entity or Relationship depending on the type of data that is being loaded. |
Predecessor Family ID | PRED_FAMILY_ID | Character | When the Family Type is Relationship, enter the value of the Entity Family ID that is the predecessor in the relationship. Otherwise, enter <none>. You can also use the data in each of the rows to determine the Predecessor Family ID. |
Predecessor Family Key Fields | PRED_FAMILY_KEY_FIELDS | Character | Enter the Field ID or IDs associated with the Predecessor family that are used to uniquely identify the predecessor record. In case of multiple values, use a pipe character (|) to separate each value. If the Primary Action is ACTION_INSERTONLY, you need not specify key fields; you can use the <none> constant. |
Successor Family ID | SUCC_FAMILY_ID | Character | When the Family Type is Relationship, enter the value of the Entity Family ID that is the successor in the relationship. Otherwise, enter <none>. You can also use the data in each of the rows to determine the Successor Family ID. |
Successor Family Key Fields | SUCC_FAMILY_KEY_FIELDS | Character | Enter the Field ID or IDs associated with the Successor Family that are used to uniquely identify the successor record. In case of multiple values, use a pipe character (|) to separate each value. If the Successor Action is ACTION_INSERTONLY, you need not specify key fields; you can use the <none> constant. |
Primary Action | PRIMARY_ACTION | Character | The value in this column determines the action that will be applied to the Primary Family records. If the Family Type is Relationship, enter any of the following values:
If the Family Type is Entity, enter any of the following values:
Deleting or purging a record will delete the current record, the difference being that purging will delete the record and all of the links or relationships tied to that record, whereas deleting a record will only delete the record, and if the record is related to another record, you cannot delete it. |
Predecessor Action | PRED_ACTION | Character | The value in this column will determine the action that will be applied to the Predecessor Family records. Enter any of the following values:
For an entity family, enter ACTION_NONE. |
Successor Action | SUCC_ACTION | Character | The value in this column will determine the action that will be applied to the Successor Family records. Enter any of the following values:
For an entity family, enter ACTION_NONE. |
Insert with Null Values? | OPTION_INSERT_ON_NULL | Boolean | When setting field values on a new record, if a value coming across is NULL, the field values will be set to NULL if this option is set to True. |
Update with Null Values? | OPTION_UPDATE_ON_NULL | Boolean | If you enter True in this column, when setting field values for an existing record, if a value is NULL, the field values will be set to NULL. |
Replace an Existing Link? | OPTION_REPLACE_EXISTING_LINK | Boolean | The Replace Existing Relationship option is used to determine how a relationship is to be maintained by its cardinality definition. For example, suppose for the relationship Location Contains Asset that is defined in the Configuration Manager:
|
Allow Change of Family? | OPTION_ALLOW_CHANGE_OF_FAMILY | Boolean | Specify whether you want to move an entity from one family to another. For example, you can move an entity that is currently assigned to the Centrifugal Pump family to the Reciprocating Pump family. All relationships will be maintained as long as the family to which the entity is being moved allows the same relationships. Note: Because of the extra processing required, selecting this option can impact the performance. |
InspectionTasks_to_TMLs Worksheet
Field Caption | Field ID | Data Type (Length) | Description |
---|---|---|---|
Task Related Entity ID | MI_TASK_RELAT_ENTIT_ID_CHR | Character (255) | Enter the Related Entity ID field value of the Inspection Task. A value is required. |
Task ID | MI_TASK_ID | Character (255) | Enter the Task ID field value of the Inspection Task. A value is required. |
TML Asset ID | MI_DP_ASSET_ID_CHR | Character (255) | Enter the TML Asset ID field value of the Thickness Measurement Location. A value is required. |
TML ID | MI_DP_ID_CHR | Character (250) | Enter the TML ID field value of the Thickness Measurement Location. A value is required. |