Defer Inspection Tasks Data Loader

About the Defer Inspection Tasks Data Loader

To create a Deferral on an Inspection Task, you must first create the Deferral and link to the Inspection Task. You can create and link these records using the Defer Inspection Tasks Data Loader.

About the Defer Inspection Tasks Data Loader Requirements

Before you use the Defer Inspection Task Data Loader, you must complete the following steps:

  • Ensure that the Inspection Management module is deployed.
  • Ensure that the following conditions are met:
    • In an Inspection Task:
      • Task ID must be unique.
      • The Related Entity ID field must contain a value.
    • In a Deferral:
      • Deferral ID must be unique.
      • The Deferred Record ID field must contain a value and match the Inspection Task ID field.

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 Security Group or a Security Role that is associated with this Security Group.

About the Defer Inspection Tasks Data Loader General Loading Strategy

Best Practices

  • Do not modify the first two rows in the Inspection_Task_Deferral worksheet.
  • The data loader workbook contains sample data in each column. This data is for reference only. 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 Defer Inspection Tasks.xlsx workbook. Do not modify the data in the Configuration sheet, except for Batch Size.

About the Defer Inspection Tasks Data Loader Workbook Layout and Use

To import data using the Defer Inspection Tasks Data Loader, APM provides an Excel workbook that must be used to perform the data load.

The following table lists the worksheets that are included in the Defer Inspection Tasks.xlsx workbook.
Note: The Excel workbook is referred to throughout this documentation as the data loader workbook.
WorksheetDescription
ConfigurationThe 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.
Inspection_Task_DeferralThis worksheet is used to create and link Deferrals to Inspection Tasks.

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.

ColorDescription
RedIndicates 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.

Configuration Worksheet

Field CaptionField IDData Type (Length)Description
Data Worksheet IDDATA_WORKSHEET_IDCharacterEnter 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 SizeBATCH_SIZECharacterEnter 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 IDPRIMARY_FAMILY_IDCharacterDepending 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 FieldsPRIMARY_FAMILY_KEY_FIELDSCharacterEnter 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 TypeFAMILY_TYPECharacterEnter Entity or Relationship depending on the type of data that is being loaded.
Predecessor Family IDPRED_FAMILY_IDCharacterWhen 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 FieldsPRED_FAMILY_KEY_FIELDSCharacterEnter 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 IDSUCC_FAMILY_IDCharacterWhen 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 FieldsSUCC_FAMILY_KEY_FIELDSCharacterEnter 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 ActionPRIMARY_ACTIONCharacterThe 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:
  • ACTION_INSERTONLY
  • ACTION_INSERTUPDATE
  • ACTION_UPDATEONLY
  • ACTION_DELETE
If the Family Type is Entity, enter any of the following values:
  • ACTION_INSERTONLY
  • ACTION_INSERTUPDATE
  • ACTION_UPDATEONLY
  • ACTION_DELETE
  • ACTION_PURGE

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 ActionPRED_ACTIONCharacterThe value in this column will determine the action that will be applied to the Predecessor Family records.
Enter any of the following values:
  • ACTION_INSERTONLY
  • ACTION_INSERTUPDATE
  • ACTION_UPDATEONLY
  • ACTION_DELETE
  • ACTION_PURGE
  • ACTION_LOCATE

For an entity family, enter ACTION_NONE.

Successor ActionSUCC_ACTIONCharacterThe value in this column will determine the action that will be applied to the Successor Family records.
Enter any of the following values:
  • ACTION_INSERTONLY
  • ACTION_INSERTUPDATE
  • ACTION_UPDATEONLY
  • ACTION_DELETE
  • ACTION_PURGE
  • ACTION_LOCATE

For an entity family, enter ACTION_NONE.

Insert with Null Values?OPTION_INSERT_ON_NULLBooleanWhen 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_NULLBooleanIf 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_LINKBooleanThe 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:
  • The cardinality is Zero or One to Zero or One.
  • The Location is LP-2300.
  • The Asset is P-2300.
While loading the date, if you assign the Asset P-5000 to be contained in the Location LP-2300, and you have set the Replace Existing Link property to True, the data loader will link P-5000 to LP-2300 and unlink P-2300 from LP-2300, assuming P-5000 is not currently linked to another location. The same is true for a relationship that is defined as Zero or One to Zero or Many, or Zero or Many to Zero or One.
Allow Change of Family?OPTION_ALLOW_CHANGE_OF_FAMILYBooleanSpecify 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.

Inspection_Task__Deferral_Worksheet

In the Inspection_Task_Deferral worksheet, you can specify the Inspection Task and the Deferral details that you want to link.
Field CaptionField IDData Type (Length)Description
Task Related Entity IDMI_TASK_RELAT_ENTIT_ID_CHRCharacter (255)Enter the Related Entity ID field value of the Inspection Task. A value is required.
Task IDMI_TASK_IDCharacter (255)Enter the Task ID field value of the Inspection Task. A value is required.
Deferral IDMI_DEFRL_ID_CCharacter (255)Enter the Deferral ID field value of the Deferral. A value is required.
TML IDMI_DP_ID_CHRCharacter (250)Enter the TML ID field value of the Thickness Measurement Location. A value is required.
Deferred DateMI_DEFRL_DFD_DT_DDateEnter the Deferred Date field value of the Deferral. A value is required.
ReasonMI_DEFRL_REASON_CCharacter (255)Enter the Reason field value of the Deferral.
CommentsMI_DEFRL_COMMENTS_CTextEnter the Comments field value of the Deferral.