IQL in object type mapping CSV import

Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 7, 2017

Hi,

I am working with insight 5.1.4. I have created a CSV import configuration and I want to have multiple object type mappings within this configuration. The objective is to synchronize multiple objects on the configuration level according to an attribute value in the CSV.

For example, I have two objects "Printer" and "Smartphone" that I want to synchronize. My CSV contains a column "Asset type" which value is either "Smartphone" or "Printer".

I would assume the IQL in the object mapping would look like :

objectType = ${Asset_type}

but this does not work.

So is it possible to use value of a CSV column in the IQL mapping ?

1 answer

1 accepted

0 votes
Answer accepted
Alexander Sundström
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2017

Hi Antoine,

What you need to do is to have an attribute on each object type, like a String, that you set according to what object type it is, like Printer or Smartphone, from the CSV column Asset Type.

Lets say that you give this attribute in Insight the name Type, then for the IQL you could use the following:

Type = Printer //For the Object Type Printer
Type = Smartphone // For the Object Type Smartphone

Best Regards
Alexander

Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 7, 2017

I am not sure, how is this any different from this IQL : 

objectType = "Printer"

Maybe I did not explain well enough or did no understand. My CSV would look like : 

Name;Asset_tag;Model

SAMSUNG 123;Smartphone;Samsung galaxy A5 2017

XEROX 123;Printer;XEROX - PHASER 8500N

So when i synchronize from the configuration level, the object mapping works thanks to this column. I thought have this kind of IQL on the object type mapping level : 

objectType = ${Name of the column}

since

objectType = "Printer"

works. This would allow me to synchronize all the objects mapped in the configuration at once. But I have not found a way yet.

Alexander Sundström
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2017

The difference is that you're using an attribute of the created object to compare against, instead of the object type, and that the placeholder is not available for the object type, but for the object attributes. That's why you have to use the way as I described.

It's possible to do as you mentioned with a static value, but not with a placeholder.

Best Regards
Alexander

Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 7, 2017

I am sorry but I still do not understand. How would putting this IQL 

Type = Printer

help with filtering the rows processed in the CSV synchronization ?

This does not reference a column of the CSV file.

Alexander Sundström
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2017

Hi Antoine, 

For each affected Object Type, create an String attribute called Asset Type.

For each import Object Type mapping, map the "Asset Type" CSV column to the Insight attribute "Asset Type"

Then you can set the IQL for the corresponding  import Object Type mapping to 

"Asset Type" = Printer //For the Object Type Printer
"Asset Type" = Smartphone // For the Object Type Smartphone

This would then map the value to the Insight field, and if the value is not Printer when importing a printer (ie its Smartphone), it won't be imported for that object type, and vice versa.

Let me know if that made it clearer.

Best Regards
Alexander

Antoine Berry
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 7, 2017

I have done it and it works, thanks for the deep explanation. 

I have another quick question : it seems that it is not possible to change an object type name anymore since Insight 5, do you confirm ?

Alexander Sundström
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2017

Hi Antoine,

Glad that you got it to work.

The Object Type can still be changed, but you need to go to the configuration for the Object Type to do that.

Please set the answer for this ticket to answered, so others can see that there is an solution for this ticket.

Best Regards
Alexander

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events