Is it possible to update existing Insight objects using a CSV file?

Laurence Reynolds April 17, 2022

Hi,

I have uploaded some objects in to Insight using a CSV file.  But at the time of loading I did not have all the data that needs to be included on the objects.  I now have the data and want to add it to the existing object.  However when I try to re-run the CSV file with the amended entries containing the new data I either get error messages saying the objects already exists or I get a duplicate object created (depending on the uniqueness setting for the label attribute).

Is it possible to update an existing object using a CSV file?

I had thought of exporting the existing objects, modifying the resultant CSV file entries with the new data and then re-importing.  Would this work?

Or do I have to delete all the current objects (after exporting them) and then re-import them with the additional data?

Please advise.  Thanks.

2 answers

1 accepted

0 votes
Answer accepted
Daniel Lau
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2022

Hi Laurence,

It is possible to update existing Insight objects using a CSV file.

You're currently most likely missing a mapping and schema changes for the new attributes and values which was created automatically when you created the import. Without the Schema changes, it won't have the field to map the data. Without the mapping, it won't know what data to map to the field.

We don't have the ability to recreate the automatically mappings after you edit the import file. So you will either have to

  • Add the attributes manually to the object schema and create manual mappings  for each of your new attributes to your data or
  • Create a new import and hit the "Create predefined Structure" and "Create predefined mappings" which will do what's in the first point essentially automatically

Also make you have "Add" on Unknown values for your import configuration settings.

Hope this solves your problems, essentially the easiest way is just to create a new import with the new file with your new data and have "Add" on Unknown Values and advise to have "Ignore" on Empty Values to not remove existing data. 

Cheers

Daniel

Kevin Chin September 9, 2022

@Daniel Lau I have similar problem and I am sure it's a common problem. When I import objects using CSV into Insight, many computer objects are being duplicated. Is there a way to import and have it ignore if the object already exist? We do not use Insight Discovery Tool. The default import will delete the original object and replace it with what is on the csv or create duplicate. My goal is to keep the original computer object and ignore what is on the import spreadsheet if it exist already.  

Mathias Ulstrup Billesbølle September 19, 2022

Hi @Daniel Lau 

Is it possible to the exact same thing for an Insight solution running on a Data Center solution as you describe above? 

Nevermind, just found the settings, so I can update existing objects as well.

Kind regards

Mathias

Steven Lees-Smith September 7, 2023

@Daniel Lau   What if the additional data does not contain the 'label' field for the data it is checking against.

I have a csv coming from an external source and the serial number is key field to identify the existing information and that is not the label field in the destination.

 

I am stuck with this one.

Daniel Lau
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 7, 2023

@Steven Lees-Smith Hey,

 

When an Import is created on the Imports tab of an Object Schema, under `Edit mapping`, and `Edit attribute mapping` expanded there's an `Identifier` for the mappings. You would want to make sure the identifier is ticker on the `Serial number` of your `Data source field` to make sure it'll match on that with it's `Destination attribute`. The `identifier` will make sure it matches using that attribute.

 

Give it a try, Hope this works!

Daniel Lau
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 7, 2023

@Kevin Chin Make sure you have the identifier and label set correct to identify already existing objects. This should be able to identify already existing objects and not import duplicates.

Steven Lees-Smith September 7, 2023

@Daniel Lau   the problem is the Label 'Name' field just stays there and there is nothing to map to it as there is no 'name' in the incoming CSV.  So I can't get past the data locator error messages.  I can't delete the requirement for the label field to be mapped but I have no incoming field to match.

Steven Lees-Smith September 11, 2023

just a note, even if you map the Label field to a matching column in the spreadsheet that is empty, the records still do not update even with only a tick in the matching field in the import that has a unique value from CSV to Assets.

There is simply no way to get the label field into this incoming spreadsheet but can't seem to update when there is a specific unique value that can be matched as an identifier.

Daniel Lau
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 11, 2023

@Steven Lees-Smith If you're using the the 'Serial number' as your identifier, is it possible to change that field on the objectType as the label? Then it won't complain?

If you're still having problem, maybe open up a support ticket and we can try help.

Steven Lees-Smith September 11, 2023

yeh I cracked open a support ticket.  

Jadi Akhilesh Prasad
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 29, 2024

@Steven Lees-Smith Did this issue got resolved??

0 votes
Björn Gullander
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.
April 18, 2022

Use the Identifier setting: 

Some of your attributes will need to be unique and this can be configured in the import configurations. In the object type mapping setup you can set an attribute as IdentifierWhen the import is run, the rows will be checked against this attribute to see if the object already exists or not. If it exists it, the object will be updated, otherwise it will be created. 

You can also select multiple attributes if a combination of the attributes are unique for an object.

Setting an attribute as unique will not affect the import behaviour. 

Laurence Reynolds June 12, 2022

Hi Björn,

Can you please advise how to "select multiple attributes if a combination of the attributes are unique for an object".

Is there any documentation on this?

Thanks.

Björn Gullander
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.
July 4, 2022

Hi @Laurence Reynolds 

By checking several of the attributes in the mappings you tell the importer to use combination of attributes to be unique. In the case below I import a license where the name of the licence and the application is the combined key. 

/Björn

multiple identifier insight import.png

Suggest an answer

Log in or Sign up to answer