Insight csv import issue

Deleted user October 13, 2020

Hi there, 

I'm having trouble importing data for insight using csv file import. 

I'm either getting this error: 

  • Cannot update a nonexistent object having key null

or this one: 

  • Missing attributes: key

I followed exactly what's in the documentation. 

Could you please let me know what's wrong?

It seems like a straightforward process but unfortunately is not!

This is my sample file format: 

Key,Name,Type,SN
, Test import, test, Furniture

Thanks, 

Pegi

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Hakan Bahadir
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 14, 2020

Hello,

I created an object type with Name, Type and SN attributes in Default/Text format. Used your example with copy/paste. And the import was successful.

Are you using text attributes? How many lines do you have in your file?

Cheers

Hakan 

Guhan December 17, 2020

I had spent an hour with various combinations, but still getting the missing attribute: Key error.

Tried with :

a. no key for the new records that supposed to be created by insight

b.moved the key column to the end in attribute configuration as Name (or Label) field attribute is unique (I made it unique in configuration) and also in the csv file to match the columns one to one between the configuration and the file header.

c. used the attribute IDs in the header instead of name.

d. kept only four records to import for a sample.

So frustrating to see such a simple import process is not handled by an add on and also the import documentation and trouble shooting page is not helpful.

If anyone successfully imported at least once can help to solve the issue. Thanks.

Guhan December 18, 2020

Nailed it. Uploaded some records successfully though it failed on me on reference objects a few times. If anyone is having similar issue, I can help. Thanks.

Tim
Contributor
January 11, 2021

I'm having similar issues.  I can't get it to create new Objects.  How did you resolve?

 

Name:Key
39 - Sales Management:

Request failed for storeObject() with tenantId dbf8b6d5e45f1646e3aef3ae88eaf44fc5! Status: 400, Message: {"errorMessages":[],"errors":{}}

Name:Department Number:Key
Sales - Management:39:

Request failed for storeObject() with tenantId dbf8b6d5e45f1646e3aef3ae88eaf44fc5! Status: 400, Message: {"errorMessages":[],"errors":{"rlabs-insight-attribute-69":"At least one value must be set"}}


Name:Department Number:Key
Sales Management:39:1234

Cannot update a nonexistent object having key 1234

Guhan January 12, 2021

Tim,

The import works as both create and update. If the key value is not provided, it creates a record and if we have a key and if the key exists, then it updates the record using the key. 

For every asset, Insight can create it's own key and you can keep the id for the 'Department Number' column (as referred in your message) as a separate column as Department ID and use '39' as the value to refer the record in this case.

So, at the end, Key is the Asset Key as referred by Insight. In your case, it is trying to update the record with the key of 39, but it could not find.

Also, save the file as csv and not as csv with utf-8. 

Tim
Contributor
January 12, 2021

Guhan,

The first two examples I gave have a key column, but no key values in an attempt to create new objects.  The issue was CSV UTF-8 as you mentioned.  Once I saved the CSV w/o UTF-8 the objects created on import.

According to the documentation, MS Excel is not supported for editing CSVs, but appears to work for CSV saved w/o UTF-8.

Capture.PNG

Thanks for your help!

 

-tim

Like Mark Hostetler likes this
TAGS
AUG Leaders

Atlassian Community Events