<?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 AddJoin is not working with inmemory feature class in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/addjoin-is-not-working-with-inmemory-feature-class/m-p/1546759#M7319</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My addjoin code is working fine when I provide the feature class with filegdb. Here is the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        out_directions_points_fc=os.path.join('D:\Workspace\PythonToolbox\Default.gdb', 'DirectionPoints')
        out_directions_lines_fc=os.path.join('D:\Workspace\PythonToolbox\Default.gdb', 'DirectionLines')

result = route.solve()

# exportng for out put. in case of failour it will be schema only
result.export(arcpy.nax.RouteOutputDataType.DirectionLines, out_directions_lines_fc)
                result.export(arcpy.nax.RouteOutputDataType.DirectionPoints, out_directions_points_fc)

arcpy.MakeFeatureLayer_management(out_directions_lines_fc, "lines_layer")
                    arcpy.MakeFeatureLayer_management(out_directions_points_fc, "points_layer")

arcpy.management.AddJoin("lines_layer", "DirectionPointID", "points_layer", "ObjectID", "KEEP_ALL", "INDEX_JOIN_FIELDS")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I am using the in memory database it's giving me error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;self.out_gdb_workspace="memory"

out_directions_points_fc=os.path.join(self.out_gdb_workspace, 'DirectionPoints')
out_directions_lines_fc=os.path.join(self.out_gdb_workspace, 'DirectionLines')

# same as above code&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Getting below error.&lt;/STRONG&gt;&lt;BR /&gt;ERROR : ExecuteError Errors:ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds.&lt;BR /&gt;Failed to execute (AddJoin).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Logs:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;DEBUG : D:\Workspace\PythonToolbox\Default.gdb\DirectionLines&lt;BR /&gt;DEBUG : D:\Workspace\PythonToolbox\Default.gdb\DirectionPoints&lt;/P&gt;&lt;P&gt;DEBUG : memory\DirectionLines&lt;BR /&gt;DEBUG : memory\DirectionPoints&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2024 22:24:54 GMT</pubDate>
    <dc:creator>Alok_Shah</dc:creator>
    <dc:date>2024-10-08T22:24:54Z</dc:date>
    <item>
      <title>AddJoin is not working with inmemory feature class</title>
      <link>https://community.esri.com/t5/developers-questions/addjoin-is-not-working-with-inmemory-feature-class/m-p/1546759#M7319</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My addjoin code is working fine when I provide the feature class with filegdb. Here is the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;        out_directions_points_fc=os.path.join('D:\Workspace\PythonToolbox\Default.gdb', 'DirectionPoints')
        out_directions_lines_fc=os.path.join('D:\Workspace\PythonToolbox\Default.gdb', 'DirectionLines')

result = route.solve()

# exportng for out put. in case of failour it will be schema only
result.export(arcpy.nax.RouteOutputDataType.DirectionLines, out_directions_lines_fc)
                result.export(arcpy.nax.RouteOutputDataType.DirectionPoints, out_directions_points_fc)

arcpy.MakeFeatureLayer_management(out_directions_lines_fc, "lines_layer")
                    arcpy.MakeFeatureLayer_management(out_directions_points_fc, "points_layer")

arcpy.management.AddJoin("lines_layer", "DirectionPointID", "points_layer", "ObjectID", "KEEP_ALL", "INDEX_JOIN_FIELDS")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I am using the in memory database it's giving me error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;self.out_gdb_workspace="memory"

out_directions_points_fc=os.path.join(self.out_gdb_workspace, 'DirectionPoints')
out_directions_lines_fc=os.path.join(self.out_gdb_workspace, 'DirectionLines')

# same as above code&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Getting below error.&lt;/STRONG&gt;&lt;BR /&gt;ERROR : ExecuteError Errors:ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds.&lt;BR /&gt;Failed to execute (AddJoin).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Logs:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;DEBUG : D:\Workspace\PythonToolbox\Default.gdb\DirectionLines&lt;BR /&gt;DEBUG : D:\Workspace\PythonToolbox\Default.gdb\DirectionPoints&lt;/P&gt;&lt;P&gt;DEBUG : memory\DirectionLines&lt;BR /&gt;DEBUG : memory\DirectionPoints&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 22:24:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/addjoin-is-not-working-with-inmemory-feature-class/m-p/1546759#M7319</guid>
      <dc:creator>Alok_Shah</dc:creator>
      <dc:date>2024-10-08T22:24:54Z</dc:date>
    </item>
  </channel>
</rss>

