Primary/Foreign Key from Relationship Class

2405
3
11-22-2013 11:35 AM
brettangel
Occasional Contributor II
I was able to get the relationshipClassNames property to work (thanks Xander!), but did not realize the relationshipClass property did not have a primary and foreign key field. 

arcpy.Describe(arcpy.MakeTableView_management(table, table + "_view")).relationshipClassNames:


I tried using some code from this thread, but get an empty value [].

fields = arcpy.Describe(relationshipName).fields
print fields


Any ideas on how to get the primary/foreign keys from a relationship class?
Tags (2)
0 Kudos
3 Replies
brettangel
Occasional Contributor II
The answer from tech support is the primary/foreign key properties are not exposed in Python, but there is an enhancement request already in for this.
0 Kudos
JillianPenney
Esri Contributor
Brett,

You may have been on one of the other threads where I posted this response, but incase you missed it, this functionality will be included in the 10.2.1 release via arcpy.Describe(<relclass>).OriginClassKeys and arcpy.Describe(<relclass>).DestinationClassKeys.

Jill
brettangel
Occasional Contributor II
Thanks Jill!
0 Kudos