<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create Relationship Class in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-relationship-class/m-p/1306995#M68189</link>
    <description>&lt;P&gt;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&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jul 2023 16:52:37 GMT</pubDate>
    <dc:creator>kapalczynski</dc:creator>
    <dc:date>2023-07-10T16:52:37Z</dc:date>
    <item>
      <title>Create Relationship Class</title>
      <link>https://community.esri.com/t5/python-questions/create-relationship-class/m-p/1306615#M68188</link>
      <description>&lt;P&gt;Im confused.&amp;nbsp; I have a python file that creates a Relationship Class on my DEV and TEST server.&amp;nbsp; Everything works fine on that Server&lt;/P&gt;&lt;P&gt;Note: that the same user and permissions are being used to run the python script on all servers.&lt;/P&gt;&lt;P&gt;I use the &lt;U&gt;&lt;STRONG&gt;SAME code&lt;/STRONG&gt;&lt;/U&gt; on my UAT and PROD server and I get an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ExecuteError: Failed to execute. Parameters are not valid
ERROR 000800: The Value is not a member of GLOBALID
Failed to execute (Create Relationship Class)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;ANY THOUGHTS?&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;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()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_0-1688753613314.png" style="width: 767px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/75013iD8D6B56A7AB4FB53/image-dimensions/767x332?v=v2" width="767" height="332" role="button" title="kapalczynski_0-1688753613314.png" alt="kapalczynski_0-1688753613314.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 18:15:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-relationship-class/m-p/1306615#M68188</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-07-07T18:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create Relationship Class</title>
      <link>https://community.esri.com/t5/python-questions/create-relationship-class/m-p/1306995#M68189</link>
      <description>&lt;P&gt;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&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 16:52:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-relationship-class/m-p/1306995#M68189</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-07-10T16:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create Relationship Class</title>
      <link>https://community.esri.com/t5/python-questions/create-relationship-class/m-p/1360095#M69401</link>
      <description>&lt;P&gt;Anyone have any thoughts on this error?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 23:32:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-relationship-class/m-p/1360095#M69401</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-12-12T23:32:21Z</dc:date>
    </item>
  </channel>
</rss>

