Creating Entities and Relationships from relationship classes

698
5
Jump to solution
05-13-2022 06:57 AM
Labels (1)
DaveBarrett1034
Esri Contributor

Hi,

I have a large dataset that is natively stored in a graph but has been provided to me in a file geodatabase with relationship classes used to define the many to many relationships. For example there is an events point feature class and an equipment table. A many to many relationship exists that looks at equipment involved in those events.

Is this possible using the tools in Pro? Or would this need to be achieved using the tools in Data Interoperability. I have tried loading the two entity tables but don't see a way to define the relationships using the relationship class. 

Many thanks,

Dave

0 Kudos
1 Solution

Accepted Solutions
MeganBanaski1
Esri Contributor

@DaveBarrett1034 Thanks for the question!

The simple answer to this would be that you can use the Load Table tool in ArcGIS Pro to load any table.

If the relationship class is attributed, you should be able to use the table in the Load Table tool after exporting it as a table (for example, with Export Table or Table to Table gp tools). If your relationship class is not attributed and therefore not a table, you currently will not be able to use either the Load Table tool or Data Interoperability as far as I know.

Let me know if you have any further questions or if you'd be willing to share more about your data I can help you find a solution!

View solution in original post

5 Replies
MeganBanaski1
Esri Contributor

@DaveBarrett1034 Thanks for the question!

The simple answer to this would be that you can use the Load Table tool in ArcGIS Pro to load any table.

If the relationship class is attributed, you should be able to use the table in the Load Table tool after exporting it as a table (for example, with Export Table or Table to Table gp tools). If your relationship class is not attributed and therefore not a table, you currently will not be able to use either the Load Table tool or Data Interoperability as far as I know.

Let me know if you have any further questions or if you'd be willing to share more about your data I can help you find a solution!

DaveBarrett1034
Esri Contributor

@MeganBanaski1  Thanks for the response.

I can confirm that the relationships are attributed.

I have tried using the load table tool but no success so far. I think that may have been the way I created the entities though.

 

From the data I have I would expect that I will have to create the events entities based on their unique id. Then the same for the equipment, using their unique ids. Then to create the relationships I would load the attributed relationship table, skip the entity creation then setup the relationships.

I'll try again today and let you know how I get on.

0 Kudos
xingchenc
Occasional Contributor

@DaveBarrett1034 

Hi Dave,

In order for the "load table" tool to extract relations in your table, you can't skip the entity creation step. Instead, you should still create those two entities(Equipment and Event) based on the ID, but be sure to check the "Merge" box on the right. After you checked "Merge" option, the tool will compare the ID against the existed ID and since you have created those two entities types already, there will be no new records(entity) added to the Equipment and Event entity list. Then you can go to step 2 (define the relationship),and you will find Equipment and Event entity type showed up in the dropdown list. Use those two entities to define the relationship.

I think by utilizing the Merge option you should get the expected result, please give it a try! 

0 Kudos
DaveBarrett1034
Esri Contributor

Hi @xingchenc thanks for the reply and suggestion. I tried this again and still no joy. The Data Interoperability workflow has proven successful and I will stick with this for this particular dataset. 

I have got the Load Table workflow working using some hospital data from this blog post

I have loaded just the hospitals in NY and been able to run some cypher queries counting hospitals by city and visualising the tree structure Hospital>Address>ZipCode>City>County>State (> = IS_IN)

Thanks

0 Kudos
DaveBarrett1034
Esri Contributor

@MeganBanaski1 I got his working yesterday. I realised it was an error I had made in the Data Interop workbench. I was creating the joins I needed on the source geodatabase tables, that the entities are derived from, not on the Entities in the graph. Once I did that all worked as expected. 

I still couldn't work out how I would achieve this using the Load Table UI in ArcGIS Pro. The Data Interop workflow does seem the most useful for more complex datasets. 

Thanks for the assist.