Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to update Insight Objects that have fields that reference another object through import

Jeremy Steuhl
Contributor
April 4, 2022

I created a object schema called "HR".  With object types "Organization" and child "US Employees".

 

I created some metadata object types like "Country", "State", "Location" etc.

image.png

I'm trying to update existing "US Employee" objects fields through an import, that reference other objects like "State" or "Country".  No matter what I do, it doesn't update the record with those referenced objects.  In the mapping of the import I set "Name=${Country}" etc, and executed the import.  It seems to ignore.

Is this not possible?

image.png

2 answers

1 accepted

1 vote
Answer accepted
Jeremy Steuhl
Contributor
April 18, 2022

I did contact support and was able to resolve this.

 

In my example, the Country object doesn't have an attribute called "Name". Instead, the attribute's name is "Country Name", as you can see below:

image.png

 

So the IQL I was using won't work, as it is trying to match the country name with a "Name" attribute that the Country object doesn't have. I changed my IQL to:

  • "Country Name" = ${Country}

 

Reran the import and all worked.  

 

I added this content to this post, because I thought it might be valuable for other new users in the future who might be new to Insights and renamed the "Name" object to something more appropriate.

0 votes
Jeremy Steuhl
Contributor
April 4, 2022

Here's my objects:

image.png

Here's my mapping:

image.png

mtalebi
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2022

Hi Jeremy,

If the referenced objects are new and are not defined in the Country object type, you need to define a mapping to add these new values as well similar to this:


Screen Shot 2022-04-05 at 12.23.41 pm.png

 

So I have two mappings, one for employees and one for countries as shown below:


Screen Shot 2022-04-05 at 12.22.42 pm.png

 

Also, beware that the mapping is case sensitive, so make sure you have the exact spelling in the mapping as is in the import file for `Country`.

Hope this helps.

Jeremy Steuhl
Contributor
April 5, 2022

Hi Thanks.  These are existing values in the "Country" object.  The employee objects already exist, I'm just trying to UPDATE some of the additional fields on the record, like "Country" or "Department", which I created as other objects.

Here's my CSV, which seems to be fine when updating fields on the employee object, but as a test, I'm just trying to update 2 employee objects, with a country from the country objects:

image.png

Here's my mapping as you described, but I don't think it's necessary based on I'm not trying to create a new country object, just reference an existing on the employee object.

image.png

 

After I execute, this is the message I get:

image.png

Which is strange, because the 2 country names in my file, already exist in the country object, exactly, yet it looks like only 1 was listed as an identical object.  I checked and there aren't any new records created in the country object, so maybe I don't understand the output on that.

Suggest an answer

Log in or Sign up to answer