Siyou Li
ServiceNow Employee
ServiceNow Employee

Previous Step

 

IH-ETL Guided Setup Step 2 - Preview and Prepare Data

 

 

Class mapping step sets up target CMDB classes. There are several requirements and guidelines for mapping source data to target CMDB classes. Also, there is an option of deactivating class mappings while preserving the settings for an easy reactivation. 

 

Below is an example configuration:

 

1. Click Set Classes and Map Source Data to CMDB

 

find_real_file.png

 

You see a screen that allows you to add a class or add conditional classes. 

 

find_real_file.png

 

2. If your data all maps to individual classes without conditions, select “Add Class”

 

This brings up a dialog box to select a class for your data.

 

find_real_file.png

 

However, it is likely that your data does not need to create every class for each row. You might also have scenarios where your data conditionally maps to a specific class. This can be accomplished through conditional class. 

A conditional class lets you map different sets of data records to different target classes according to specific column values, or the status of a specific plugin. 

For example, if a display name contains 'Windows', then 'Windows Server' is selected as the target class. But if the display name contains 'Linux', then 'Linux Server' is selected as the target class. For records that do not meet any of these conditions (display name does not contain 'Windows' nor 'Linux'), 'Server' is selected as the target class. 

As an example, let’s say you are working with multiple data types: Computers, Network Adapters, and Software, you are using conditional classes. The logic is as follows:  

  

  • If type is a computer, create a Computer class 
  • If type is a network, create a Network Adapter 
  • If type is network and there is an IP address, create an IP Address 
  • If type is software, create a Software 
  • If type is software, create a Software Instance  

 

1. Click Add Conditional Class

 

This brings up a dialog for you to set your conditions and the resulting class.

 

find_real_file.png

 

2. Set your if condition to “u_type” “is” “computer” and set the output class to “Computer”

 

3. Click "Save"

 

You do not need to specify an else condition. Your mapping should now look like this:

 

find_real_file.png

 

4. For each conditional class, click “Add Conditional Class”, fill out the condition and the target class

 

However, “Software Instance” is not a Configuration Item, you also need to add an associated class. 

An associated class lets you select the CMDB class to be associated with a target non-CMDB class, which is required for IRE processing. 

If the target class for mapping is a non-CMDB class with a reference to a CMDB class, you must select the CMDB class to associate the non-CMDB target class with. A non-CMDB class refers to a class, such Serial Number [cmdb_serial_number], that does not extend the Configuration Item [cmdb_ci] class. The Related Entry [cmdb_related_entry] class might contain multiple CMDB class associations for the same non-CMDB class. Therefore, select the appropriate association to allow IRE processes to update the target non-CMDB class. 

For example, the Related Entry [cmdb_related_entry] class has a record which associates the non-CMDB Software Instance [cmdb_software_instance] class with the CMDB Software Package [cmdb_ci_spkg] class. If you select Software Instance as a target class, you must associate the Software Instance class with the Software Package [cmdb_ci_spkg] class. 

 

1. Click “Add Associated Class” 

 

find_real_file.png

 

2. Select “Software 1” from dropdown

 

find_real_file.png

 

When you edit an ETL transform map, you can delete a class mapping to prevent the class from being populated when the integration runs. However, if you later decide to populate that class, you must readd that class and reconfigure all the class mappings. Instead, you can deactivate a class mapping to temporarily ignore the class during the integration run, while preserving all of its mapping configuration. A class that you choose to deactivate is grayed out in the user interface but you can continue and edit the class mappings. Later, you can reactivate a class mapping to enable populating the class, without needing to reconfigure the class mappings. 

 

Some classes that you choose to deactivate, trigger an automatic deactivation of additional classes that you did not directly choose to deactivate. Which classes are automatically deactivated, depends on the class that you chose to deactivate. For example, whether the class has dependent relationships or associated classes. Those automatically deactivated classes: 

  • Appear in light gray in the user interface and you can't reactivate them
  • Are automatically reactivated when you reactivate: 
    • The class that you initially deactivated which triggered the automatic deactivation
    • Any class that the deactivated class depends on 

All classes that you directly deactivate mappings for and the resulting class mappings that are automatically deactivated, are not populated when the integration runs. Also, any relationships and lookup tables associated with those classes, are not populated when the integration runs. 

Deactivation scenarios: 

  • Deactivate a class which no class depends on and which has no associated classes: 
    • Triggers an automatic deactivation of any lookup rules and relationships associated with the deactivated class. 
  • Deactivate a lookup rule, such as serial number, within a class mapping:
    • Does not trigger any automatic deactivations. 
  • Deactivate a CMDB class which is associated with a non-CMDB class: 
    • Triggers an automatic deactivation of the associated non-CMDB class. 
    • Deactivating the non-CMDB class, does not impact the associated CMDB class. 
  • Deactivate a class with dependent relationships (Applies only if the dependent relationship exists in IntegrationHub ETL): 
    • Triggers an automatic deactivation of any class that has a single dependent relationship with the deactivated class. 
    • If a class has multiple dependent relationships, then it is automatically deactivated only when you deactivate all of the dependent on classes. 
    • For example, a scenario in which the File System class has dependent relationships with both, the Computer and a Server class. If you deactivate the Computer class, the File System class is not automatically deactivated. Only if you also deactivate the Server class, the File System class is automatically deactivated. 
  • Deactivate a conditional class or a class mapping within a conditional class: 
    • Deactivating or activating a conditional class, triggers an automatic deactivation or activation of all conditional class mappings within the conditional class. 
    • Deactivating a class mapping within a conditional class: Prevents the deactivated class from getting populated during integration runs. However, the associated 'If', 'Else if', or 'Else' conditions themselves remain in effect within the condition of the conditional class. For example, if you deactivate the following class mapping: 
    • [If] [operating_system] [contains] [Linux] Then [Class] [is] [Linux Server]. Then, the Linux Server class is not populated, but the [If] [operating_system] [contains] [Linux] condition is in effect. 

 

 

Additional Resources

 

Landing page

 

IH-ETL common error scenarios

 

Next Step

 

IH-ETL Guided Setup Step 4 - Field Mapping

 

Version history
Last update:
‎11-14-2021 11:26 PM
Updated by: