I'm trying to create several Relationship Classes with the cardinalities 1:1 and n:n. The below script works fine with my 1:1 relationship classes. It runs also for the n:n cardinalities, creates some relationship classes, but I can't access its values with the explore tool as with the 1:1 relationship classes. Why? What's wrong?
for index, row in df.iterrows():
arcpy.management.CreateRelationshipClass(origin_table = row["origin_table"],
destination_table = row["destination_table"],
out_relationship_class = row["out_relationship_class"],
relationship_type = row["relationship_type"],
forward_label = row["forward_label"],
backward_label = row["backward_label"],
message_direction = row["message_direction"],
cardinality = row["cardinality"],
attributed = row["attributed"],
origin_primary_key = row["origin_primary_key"],
origin_foreign_key = row["origin_foreign_key"],
destination_primary_key = row["destination_primary_key"],
destination_foreign_key = row["destination_foreign_key"])
with my table:
| origin_table | destination_table | out_relationship_class | relationship_type | forward_label | backward_label | message_direction | cardinality | attributed | origin_primary_key | origin_foreign_key | destination_primary_key | destination_foreign_key |
| mgdm_polygone_polygon | mgdm_polygone_regel | polygon_regel | SIMPLE | Regel | polygon | NONE | MANY_TO_MANY | NONE | Regel | Regel | RegelCode | # |