- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2016 11:15 PM
I have a big problem with importing the data.
A Transform Map is set to have multiple coalesce fields. One of the coalesce fields is a reference (where lookup value is a string being the asset_tag of the referenced CMDB_CI subclass record).
Now, I have observed that when a correct asset tag (of an existing record) is provided everything is fine.
But if the reference cannot be resolved (meaning, there is no record with the asset_tag equal to the value provided in the source row) then a previously looked up value is used in this reference field instead of coming up empty . The referenced record value is later on tested in the transform map script and the script prevents saving a record without valid cmdb_ci reference - but in this case the reference field is not empty, it does refer to a correct existing cmdb_ci record, although a wrong one !
As a result, a record referencing a wrong configuration object is created which is a no go for me.
Using the onBefore script I found out that most likely the transform "target" record is not zeroed before row processing. So it looks like an unsuccessful lookup on reference does not return null (as expected), it rather just leaves the target row field unchanged (so, keeps a previously matched reference) and this is where the problem is.
Transform map is set to Run business rules = true, copy empty fields = true.
Field map is set to Choice action = ignore, Coalesce empty fields= false, Coalesce case sensitive = false
Build is Dublin.
At the moment I am "manually" fixing this by making an extra comparison on source.u_assettag == target.u_referecefield.asset_tag in the transform script (and error a row if it does not match) , but I'm honestly thinking this can't be a normal platform behavior and this is rather a bug (as one can naturally expect that unmatched reference lookups would come up empty!)
Did anyone also had a similar problem? Is there a proper solution to this?
thanks
Rafal
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 02:33 PM
After some trials I finally managed to find out what was wrong.
It is the "Coalesce empty fields" checkbox that was cleared. When I checked it the whole thing finally started to work correctly!
anyway, thanks for your efforts anyone involved!
//Rafal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2016 12:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2016 02:04 AM
Hi Paramveer
Thank you for showing interest in my question. And sorry that I forgot to add: the Choice action is already Ignore.
See below for more details .
The highlighted u_target field (being a reference to some subclass derived from cmdb_ci) is what I am having problems with. The u_object_id field in the imported data (source) contains an asset tag to be looked up and resolved into a proper reference. But if the match cannot be found, the reference will just remain set to a previously matched CMDB CI record (instead of being empty).
Remaining coalesce fields do not seem to be relevant to the issue (they either provide some constant initial values or serve as datetime format translations and value substitutions).
cheers
Rafal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 02:33 PM
After some trials I finally managed to find out what was wrong.
It is the "Coalesce empty fields" checkbox that was cleared. When I checked it the whole thing finally started to work correctly!
anyway, thanks for your efforts anyone involved!
//Rafal