ETL RTE skip inserts.

Adrian M
Tera Contributor

Hi All,

 

We're using ETL RTE to import data into the CMDB, together with the relationships and CIs related to it.

 

Currently, ServiceNow is discovering some of the attributes for the class I'm trying to populate, then we're using RTE to fill in the blanks. 

 

What we want is to prevent RTE from creating new records, but still update records that are in the CMDB.

 

We were able to do this in a normal transform map by using "if (action == 'insert') ignore = true;". But it seems there is no functionality like this for RTE.

 

Workarounds tried:

 

1.) onBefore script, created the condition for when we want the item to be skipped, then used

"input[i].status = 'SKIPPED';"

Unfortunately, this functionality skips the entire payload, which means skipping all the updates as well.
 
2.) Also an onBefore script, I tried removing the value for the attribute "primary identifier" which is the identifier for the class' identification rule:

          If(skipRecord){
               input[i].items[j].values.primary_identifier = "";
          }
 
This removes the primary identifier for the item, which causes the IRE to skip these items and create a partial payload.
 
The issue with number 2 is, after executing, instead of updating records, it now creates new records which are duplicates of records already in the CMDB.
 
If anyone knows a better way on how to approach this, please let me know. Thanks in advance!
2 REPLIES 2

Steven Watts2
Tera Guru

Hi @Adrian M 

I have a similar requirement to this, did you ever get this to work?

Steven

Ximizu
Mega Guru

Hi Adrian,

 

I have a similar business need with mobile device data import to ServiceNow from Intune, where I want the import to update data only and not insert new data.

 

In order to achieve this, the setup is not done in the Robust Import Set Transformer, but in the IRE Data Source Rule.

 

When using Identification and Reconciliation Engine (IRE), you can prevent a specific discovery (data) source from inserting new CIs for a specific class. Create IRE data source rules for discovery sources that you don't trust in creating CIs but continue to trust in updating those CIs that exist.

 

In my case, the following setup allowed me to not create new data but update only, when importing from Intune using the Robust Import Set Transformer.

Ximizu1_0-1727900422628.png