Data in import set table but can not be transformed into target table

Cheng Luo
Kilo Contributor

I am using a dev instance dev64918.service-now.com to load some system configuration data from xml file into cmdb using import set. After loading, I can see the import set table was updated with records properly. However when I tried to use transform map(field map) to transform those data into target table(user defined). I can see the record in import set table was changed into Processed state. However the target table was still empty. Screen shot for the import set table and transform record attached. Anyone can help on this?

find_real_file.pngfind_real_file.png

1 ACCEPTED SOLUTION

Hi,

If your query is resolved, please mark the answer as correct and close this thread for others.


Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

17 REPLIES 17

Hi,

If your query is resolved, please mark the answer as correct and close this thread for others.


Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

For anyone reading this thread, this should not be the accepted answer and shloke4 and others are leading people down the wrong path.  You should be using the IdentificationEngine like Alex and I mentioned.  

Sandeep74
Tera Expert

Hi ,

 

can you please reload the data once again and do the same process once again ,

Sean Duhaime
Giga Contributor

You should never insert into the CMDB directly as you are doing you should call the Identification Engine and let it handle the action.  You can call it numerous ways, via REST, via server-side JS.  If you are using the legacy Transform Maps (which it sounds like you are) you can easily invoke IRE via the CMDBTransformUtil, which is just a well-documented wrapper around the IRE.  You can also invoke IRE directly with:

 

sn_cmdb.IdentificationEngine.createOrUpdateCIEnhanced("stringyDiscoSource", jsonInputPayload, options)

 

JSON should have these keys:

 

"items": [

  { 

    "className": "String", 

    "internal_id": "String", 

    "lookup": [Array],

    "related": [Array],

    "settings": {Object},

    "sys_object_source_info": {Object},

    "values": {Object},

    "display_values:[Array]

  }

]

 

Sample options object (Optional 3rd arg to the API call)

var opt = { 

    partial_payloads: true, 

    partial_commits: true, 

    deduplicate_payloads: true, 

    generate_summary: true 

}

 

Hi, Sean

I was following the doc to populate CMDB from my own source:
https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/product/configuration-management/concept/c_OptionsToPopulateCMDB.html#d787911e186

I did not realize it is legacy way. You referred numerous way like REST. Are you talking about the CMDB instance API referred below?
https://docs.servicenow.com/bundle/quebec-application-development/page/integrate/inbound-rest/concept/cmdb-instance-api.html

Further During CMDB resource update, one question is how CMDB uniquely identify one record? By sys_id or other ways? I can see the import set is keeping inserting new records instead of updating the existing one.