Efficiently inserting data into main and related tables in ServiceNow using IH ETL

  • December 9, 2023

The IP switch table in ServiceNow stores information about IP switches such as their name, model, and serial number. The Switchport table stores information about individual switch ports, including their name, number, and status. Finally, the network adapter table stores information about network adapters, including their name, model, and speed. 

To insert data into these tables using IH ETL, we would first configure the source to extract the data we want to insert. For example, we might extract data from a CSV file or a database that contains information about IP switches, switch ports, and network adapters. 

Step 1 :  Provide data source detail 


 

 

Step 2: During the preview step, you can see a preview of the data that will be extracted from the source. This can help you identify any potential issues, such as missing data or data that is not formatted correctly. 

Once you have previewed the data, you can begin preparing it for insertion into ServiceNow. This might involve cleaning and transforming the data, such as removing duplicates or converting data types. 

Preparing the data is a crucial step in ensuring that the data is properly formatted and ready for insertion into ServiceNow. By taking the time to prepare the data before mapping the fields, you can ensure that the data will be inserted correctly and without errors. 

 So, to summarize the steps for inserting data into main and related tables in ServiceNow using IH ETL, the process would be: 

  1. Configure the source to extract the data you want to insert. 
  1. Preview and prepare the data to ensure it is properly formatted and ready for insertion. 
  1. Map the fields from the source to the corresponding fields in the main and related tables in ServiceNow. 
  1. Join the tables based on a common field. 
  1. Configure the destination to insert the data into ServiceNow. 

Following these steps can help you efficiently manage data in ServiceNow using IH ETL. 

"If you need to insert data into a reference field in ServiceNow, such as the manufacturer field in an IP switch or switchport table, you can use a transform script to convert the input data into a format that ServiceNow can recognize. Transform scripts are small pieces of code that can be written and executed within the IH ETL process, and they are particularly useful when dealing with complex data transformations. 

For example, let's say you have a list of IP switches and you want to insert them into ServiceNow. The switches are associated with different manufacturers, and you want to ensure that the manufacturer data is properly inserted into the "core_company" table in ServiceNow. To do this, you can create a transform script that uses the GlideRecord API to search for the manufacturer name in the "core_company" table. If the manufacturer exists, the script sets the output value to the corresponding unique value for that manufacturer. If the manufacturer does not exist, the script creates a new record in the "core_company" table and sets the output value to the unique value for the new record. 

By using a transform script in this way, you can ensure that your data is properly formatted and ready for insertion into ServiceNow. 

 

 

Step 3 : Mapping 

 

 

"Once you have prepared your data and created any necessary transform scripts, the next step in the IH ETL process is to map your data to the CMDB (Configuration Management Database) in ServiceNow. Mapping your data involves defining the relationships between the tables and fields in your data and the corresponding tables and fields in the CMDB. 

 If you have created a transform script to insert data into a reference field, for example, you will need to use the data pill for that field in your mapping. Data pills are small, dynamic pieces of data that are used to map your data to the CMDB. By using data pills, you can ensure that your data is correctly linked to the appropriate tables and fields in ServiceNow. 

 To map your data using data pills, simply drag and drop the appropriate data pills from the IH ETL mapping screen to the corresponding fields in the CMDB. You can also use the "preview" feature in IH ETL to verify that your data is correctly mapped before you insert it into ServiceNow. 

 Overall, mapping your data to the CMDB is an important step in the IH ETL process. By correctly defining the relationships between your data and the CMDB, you can ensure that your data is correctly structured and organized in ServiceNow, making it easier to manage and maintain over time." 

Step 4 : Run and schedule the integration. 

 

 Add data in swithcport table :  

"Once you have mapped your data to the CMDB in ServiceNow, the next step is to actually insert the data into the appropriate tables. Let's take the example of inserting data into the switchport table in ServiceNow. The switchport table has a number of attributes, including the IRE attribute, which represents the interface number, and a dependent relationship to the network gear table. 

To insert data into the switchport table, you will need to create a value for the source native key (SNK) attribute. The SNK is a unique identifier for the table, and it is typically based on one or more attributes of the table. In the case of the switchport table, you can use the interface number and the configuration item as the SNK. 

 To create the SNK, you will need to create a transform type concatenation in the second step of the IH ETL process. The concatenation combines the interface number and configuration item into a single value that can be used as the SNK. Once you have created the SNK, you can use it to insert data into the switchport table in ServiceNow. 

 

 

"In the third step of the IH ETL process, you will need to add relationships between the tables in ServiceNow. In the case of inserting data into the switchport table, you will need to add a relationship between the switchport and network gear tables. 

To do this, you will need to first ensure that the network gear class is included in the mapping. You can map it to the 'name' attribute in ServiceNow. This will allow you to create a relationship between the switchport and network gear tables based on the name of the network gear. 

 

 Once you have mapped the network gear class, you can add the relationship between the switchport and network gear tables. To do this, you will need to select the parent table as the network gear table, and the child table as the switchport table. You can then specify the relationship type as 'contained by', and the opposite relationship type as 'contains'. This will ensure that the relationship between the switchport and network gear tables is correctly established. 

 

 

Blog Post

Related Articles

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

Understanding TPSM: The Future Of Tech Service Management

March 20, 2024
Technology Provider Service Management (TPSM) is a strategic solution that integrates customer care and operations...

Seamless Ecosystem Integration: The Benefits Of ServiceNow TPSM Service Bridge

April 3, 2024
Technology providers need seamless ecosystem connectivity with their customers, and partners to support efficient...

Streamlining Service Management & Delivery With ServiceNow TPSM

March 13, 2024
ServiceNow's Technology Provider Service Management (TPSM) is a solution designed to facilitate effective service...