<?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: Exporting a hosted feature layer with attachments to memory in Pro in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506476#M71085</link>
    <description>&lt;P&gt;They may not be able to support attachments, but in theory, they should be able to support a table, e.g. an attachment table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the larger issue here is that it's really hard to look for the attachment table in a hosted feature service with arcpy, to the point where I'm really not sure how best to do it without downloading to local? It's a serious deficiency.&lt;/P&gt;&lt;P&gt;You could look at the ArcGIS Python API&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/using-attachments-with-feature-layers/" target="_blank" rel="noopener"&gt;Layer Attachments | ArcGIS API for Python&lt;/A&gt;&amp;nbsp;but quite frankly, I find it confusing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/607017"&gt;@HaydenWelch&lt;/a&gt;&amp;nbsp;'s suggestion of the Export Attachments Tool is going to be the most straightforward for you to use?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2024 05:36:20 GMT</pubDate>
    <dc:creator>AlfredBaldenweck</dc:creator>
    <dc:date>2024-07-18T05:36:20Z</dc:date>
    <item>
      <title>Exporting a hosted feature layer with attachments to memory in Pro</title>
      <link>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506380#M71081</link>
      <description>&lt;P&gt;I'm trying to increase the performance of a script we run to download all images from selected records in a hosted feature layer and save them down with specific naming formatting. We've been doing this by exporting the hosted feature layer to a local geodatabase and following the rest of the process. But the time to process keeps increasing exponentially when accessing these intermediate steps from the local geodatabase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get these intermediate steps to all run in memory until saving the final photos down to our network server. I can easily get the input_layer to memory and added to the map. But it doesn't come with any of its attachments and I can't find a way to save the attachments table as well. Any thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;p = arcpy.mp.ArcGISProject("CURRENT")&lt;BR /&gt;m = p.listMaps()[0]&lt;BR /&gt;tempExportFeatureClass = arcpy.conversion.ExportFeatures(&amp;lt;input_layer&amp;gt;, r"memory\TempExport")&lt;BR /&gt;tempExportFeatureClass_object = arcpy.management.MakeFeatureLayer(tempExportFeatureClass, "TempExport_lyr")&lt;BR /&gt;TempExport_lyr = tempExportFeatureClass_object.getOutput(0)&lt;BR /&gt;m.addLayer(TempExport_lyr)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 21:47:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506380#M71081</guid>
      <dc:creator>NicholasKatchur</dc:creator>
      <dc:date>2024-07-17T21:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting a hosted feature layer with attachments to memory in Pro</title>
      <link>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506456#M71082</link>
      <description>&lt;P&gt;Have you tried using the new &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/export-attachments.htm" target="_self"&gt;Attachment Export&lt;/A&gt; tool? You could pretty easily rebuild the attachment table by building the directory structure and file naming from the attachment ID field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 04:20:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506456#M71082</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2024-07-18T04:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting a hosted feature layer with attachments to memory in Pro</title>
      <link>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506473#M71084</link>
      <description>&lt;P&gt;In-memory workspaces aren't geodatabases, they don't support attachments (among many other GDB features).&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 05:21:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506473#M71084</guid>
      <dc:creator>MobiusSnake</dc:creator>
      <dc:date>2024-07-18T05:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting a hosted feature layer with attachments to memory in Pro</title>
      <link>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506476#M71085</link>
      <description>&lt;P&gt;They may not be able to support attachments, but in theory, they should be able to support a table, e.g. an attachment table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the larger issue here is that it's really hard to look for the attachment table in a hosted feature service with arcpy, to the point where I'm really not sure how best to do it without downloading to local? It's a serious deficiency.&lt;/P&gt;&lt;P&gt;You could look at the ArcGIS Python API&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/using-attachments-with-feature-layers/" target="_blank" rel="noopener"&gt;Layer Attachments | ArcGIS API for Python&lt;/A&gt;&amp;nbsp;but quite frankly, I find it confusing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/607017"&gt;@HaydenWelch&lt;/a&gt;&amp;nbsp;'s suggestion of the Export Attachments Tool is going to be the most straightforward for you to use?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 05:36:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exporting-a-hosted-feature-layer-with-attachments/m-p/1506476#M71085</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2024-07-18T05:36:20Z</dc:date>
    </item>
  </channel>
</rss>

