Select to view content in your preferred language

Load relationships between entities of the same type

78
2
Jump to solution
a week ago
AnnyHuang
Emerging Contributor

I am using the Load Table option to create my knowledge graph, had no problem until importing a table that contains relationships between the same entities.

E.g. Stakeholder 1 is related to Stakeholder 2. Both are the same Entity Type 'Person'.

My table looks like:

Stakeholder_ID, RelatedTo_ID, Relationship_Title

1, 10, Manager

Screenshots of what I attempted in Load Table:

AnnyHuang_0-1761245385042.png

AnnyHuang_1-1761245395463.png

 

 

I checked 'Merge' because I already have stakeholders loaded. What ended up after running the load table action is that many Stakeholder entities were created with null Stakeholder_ID, and some relationships have null as the origin or destination.

 

0 Kudos
1 Solution

Accepted Solutions
KeiranBray
Esri Contributor

Hey @AnnyHuang might need to check the properties for the entities and what they're merging on. when you're loading two different fields of data into the one entity type (stakeholder), you want to make sure that the property that is getting used to merge is named the same across the entities.

An example with screenshots below I have a column with employee name and another column with manager name (in your case this would be the stakeholder_id and related_to_ID both going into a employee entity. I'm making sure that they're merging on the same property field, this should then remove the circular relationships or duplicates, if there are fields cells that are empty in your data, leave them empty as it might pick up characters:

Entities

KeiranBray_0-1761260342754.png

Relationships:

KeiranBray_1-1761260375963.png

Properties employee name:

KeiranBray_2-1761260390985.png

Properties for Manager_name:

KeiranBray_3-1761260410068.png

Example output:

KeiranBray_4-1761260431511.png

KeiranBray_5-1761260441370.png

Starting table (subbing out names for IDs):

KeiranBray_6-1761260515519.png

 

Let me know how it goes, happy to take a look at an example table you might have.

Cheers

Keiran

 

View solution in original post

2 Replies
KeiranBray
Esri Contributor

Hey @AnnyHuang might need to check the properties for the entities and what they're merging on. when you're loading two different fields of data into the one entity type (stakeholder), you want to make sure that the property that is getting used to merge is named the same across the entities.

An example with screenshots below I have a column with employee name and another column with manager name (in your case this would be the stakeholder_id and related_to_ID both going into a employee entity. I'm making sure that they're merging on the same property field, this should then remove the circular relationships or duplicates, if there are fields cells that are empty in your data, leave them empty as it might pick up characters:

Entities

KeiranBray_0-1761260342754.png

Relationships:

KeiranBray_1-1761260375963.png

Properties employee name:

KeiranBray_2-1761260390985.png

Properties for Manager_name:

KeiranBray_3-1761260410068.png

Example output:

KeiranBray_4-1761260431511.png

KeiranBray_5-1761260441370.png

Starting table (subbing out names for IDs):

KeiranBray_6-1761260515519.png

 

Let me know how it goes, happy to take a look at an example table you might have.

Cheers

Keiran

 

AnnyHuang
Emerging Contributor

Hi Kerian, thanks a lot for the detailed response. 

I made the same mistake again when I tried following your example but eventually realized the issue is with the Property Name on the 'Properties' step.

If using your example to explain:

When specifying the properties of Manager, Property Name for 'Manager Name' need to be manually changed to 'Employee_Name' to be consistent (see 2nd screenshot below). I added this property by clicking from column names and it carried over the column name from data source, therefore causing problems with merging.

AnnyHuang_0-1761675756355.png

AnnyHuang_1-1761675831777.png

 

0 Kudos