IQL in object type mapping CSV import

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

Accepted Answer
0 votes

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

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.

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

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.

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

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 ?

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
Community showcase
Posted Oct 11, 2018 in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

3,477 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you