Forums

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

Assets importsource update object fails

dberrutti
Contributor
December 20, 2024

Hello guys,

I'm facing some problems using importsource api to import asset objects thru an external import, here is the case:

Through the API I managed to create the schema and mappings with all the correct object types and their attributes.

These types have one Unique attribute, with a custom name and externalId, which I intend to use as "key" to update the object later, when one  other attributes values change.

Everything goes fine the first I populate the objects, all of them are imported successfully. However, when I try to update the objects after changing some other attributes values, seems that it tries to create a new object instead of updating the object with the same unique attribute value, saying:

 

"errorMessages" : [ "<OBJECT_NAME>: The attribute '<ATTRIBUTE>' has to be unique; " ]

Obviously, this attribute's value is the same for the object I try to update, it is supposed to "identify" it.

Is there something I'm missing here?

1 answer

1 accepted

0 votes
Answer accepted
Anusha A
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 23, 2024

Hi Daniel,

Thanks for your question on community. To address this, we’ll follow a few steps to ensure the import process works correctly:

  1. Check for Existing Objects:
    First, we need to verify that the new unique value we’re importing is not already mapped to another object in the system. We can do this by performing a search using AQL (Arango Query Language).
  2. Determine Import Behavior:
    Next, we need to assess whether the import process has identified an existing object or is attempting to create a new one. This depends on the mapping configuration and how the import is set up.
  3. Review the Import Mapping:
    Specifically, we’ll look at which attributes are marked as Identifiers. These are the attributes used to match an existing object in the system.
  4. Compare Attribute Values:
  • We’ll check the attribute values for the existing object in the system.
  • We’ll also review the attribute values being sent through the import (the source data).

If the values for the Identifier attributes match between the existing object and the source data, the import process should recognize and update the existing object rather than creating a new one. This ensures that any existing objects are properly matched and updated, avoiding duplicates during the import process.

Please let me know if you need further help, I would be happy to create a support ticket on your behalf to assist further on your request. 

Regards,
Anusha A

dberrutti
Contributor
December 23, 2024

Hi Anusha, 

Thank you very much for your quick response.

I think my problem resides here:

Specifically, we’ll look at which attributes are marked as Identifiers. These are the attributes used to match an existing object in the system.

Perhaps I didn't mark the identifier attribute as an identifier properly, and I don't know how to do this, I couldn't find in the documentation how to do it.

I have defined this attribute for the type:

{
"unique" : true,
"name" : "Mail",
"externalId" : "mail",
"description" : "The user's Mail",
"type" : "text"
}

and this is its mapping:

{
"attributeLocators" : [ "mail" ],
"externalIdPart" : true,
"attributeName" : "Mail",
"attributeExternalId" : "mail"
}

Could you please help?

 

Thank you 

Anusha A
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 23, 2024

Hi Daniel,

 

To ensure it functions as an identifier, you can verify the import configuration through the UI, the mail attribute should have a blue checkmark beside it. Also, you can check if there are other attributes that are marked as identifiers and if you are submitting them.

 

However, to assist you effectively with this case, I have created a support ticket on your behalf. You should have received an email notification confirming this and ticket details.

 

Regards,
Anusha A

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events