Select to view content in your preferred language

Create Relationship Class

446
2
07-07-2023 11:08 AM
kapalczynski
Frequent Contributor

Im confused.  I have a python file that creates a Relationship Class on my DEV and TEST server.  Everything works fine on that Server

Note: that the same user and permissions are being used to run the python script on all servers.

I use the SAME code on my UAT and PROD server and I get an error:

 

ExecuteError: Failed to execute. Parameters are not valid
ERROR 000800: The Value is not a member of GLOBALID
Failed to execute (Create Relationship Class)

 

ANY THOUGHTS?

 

import arcpy

arcpy.env.workspace = "Database Connections\\GIS_DEV@gis_data.sde"
       
def createRelationships():
    print("")
    arcpy.CreateRelationshipClass_management(origin_table="Database Connections\\GIS_DEV@gis_data.sde\\GIS_DATA.SDE_AAH",
           destination_table="Database Connections\\GIS_DEV@gis_data.sde\\GIS_DATA.TBL_AAH_Pickups",
           out_relationship_class="Database Connections\\GIS_DEV@gis_data.sde\\GIS_DATA.REL_AAH_TO_PICKUP",
           relationship_type="COMPOSITE",
           forward_label="GIS_DATA.TBL_AAH_Pickups",
           backward_label="GIS_DATA.SDE_AAH", 
           message_direction="NONE", 
           cardinality="ONE_TO_MANY",
           attributed="NONE", 
           origin_primary_key="GLOBALID", 
           origin_foreign_key="GUID",
           destination_primary_key="", 
           destination_foreign_key="")

if __name__ == '__main__':
    # Create Relationships
    createRelationships()

 

 

kapalczynski_0-1688753613314.png

 

 

0 Kudos
2 Replies
kapalczynski
Frequent Contributor

If I go to the server and use the same credentials I can do this manually via ArcCatalog... wondering why its not working with Python

0 Kudos
kapalczynski
Frequent Contributor

Anyone have any thoughts on this error?

0 Kudos