<?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 How to update connection properties to in memory source in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-update-connection-properties-to-in-memory/m-p/1019782#M59626</link>
    <description>&lt;P&gt;ArcGIS Pro 2.6 and Python 3.6&lt;/P&gt;&lt;P&gt;I am creating a custom Map Series and have hit a bit of a roadblock. I originally was writing all data to a local FGDB, but I'm looking for ways to improve performance.&lt;/P&gt;&lt;P&gt;I switched to using `memory` as this appeared to be a viable option. However, I cannot update the source of the layers inside the map document (.aprx). I have been able to do this successfully with local files (not using the Python CIM), but I am stumped trying to do it with memory objects. Is it even possible?&lt;BR /&gt;&lt;BR /&gt;Here is the layer as it currently exists in my map:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndyMillion_0-1611604569508.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4500iA4982805CC74E3A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="AndyMillion_0-1611604569508.png" alt="AndyMillion_0-1611604569508.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And here is what I'm trying (though I have tried a few things with no luck).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;lyrCIM = l.getDefinition("V2")

dc = lyrCIM.featureTable.dataConnection

dc.workspaceFactory = "InMemoryDB"
dc.datasetType = "esriDTAny"
dc.workspaceConnectionString = r"memory//" + l.name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Edit:&lt;BR /&gt;Well, maybe it is working?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndyMillion_0-1611604990737.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4502i496CEC4B0EDE0DDC/image-size/large?v=v2&amp;amp;px=999" role="button" title="AndyMillion_0-1611604990737.png" alt="AndyMillion_0-1611604990737.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2021 20:03:36 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-01-25T20:03:36Z</dc:date>
    <item>
      <title>How to update connection properties to in memory source</title>
      <link>https://community.esri.com/t5/python-questions/how-to-update-connection-properties-to-in-memory/m-p/1019782#M59626</link>
      <description>&lt;P&gt;ArcGIS Pro 2.6 and Python 3.6&lt;/P&gt;&lt;P&gt;I am creating a custom Map Series and have hit a bit of a roadblock. I originally was writing all data to a local FGDB, but I'm looking for ways to improve performance.&lt;/P&gt;&lt;P&gt;I switched to using `memory` as this appeared to be a viable option. However, I cannot update the source of the layers inside the map document (.aprx). I have been able to do this successfully with local files (not using the Python CIM), but I am stumped trying to do it with memory objects. Is it even possible?&lt;BR /&gt;&lt;BR /&gt;Here is the layer as it currently exists in my map:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndyMillion_0-1611604569508.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4500iA4982805CC74E3A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="AndyMillion_0-1611604569508.png" alt="AndyMillion_0-1611604569508.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And here is what I'm trying (though I have tried a few things with no luck).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;lyrCIM = l.getDefinition("V2")

dc = lyrCIM.featureTable.dataConnection

dc.workspaceFactory = "InMemoryDB"
dc.datasetType = "esriDTAny"
dc.workspaceConnectionString = r"memory//" + l.name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Edit:&lt;BR /&gt;Well, maybe it is working?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndyMillion_0-1611604990737.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4502i496CEC4B0EDE0DDC/image-size/large?v=v2&amp;amp;px=999" role="button" title="AndyMillion_0-1611604990737.png" alt="AndyMillion_0-1611604990737.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 20:03:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-update-connection-properties-to-in-memory/m-p/1019782#M59626</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-25T20:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to update connection properties to in memory source</title>
      <link>https://community.esri.com/t5/python-questions/how-to-update-connection-properties-to-in-memory/m-p/1019795#M59627</link>
      <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/appendices/using-the-in-memory-output-workspace.htm" target="_blank"&gt;Considerations when using the in_memory workspace—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The in_memory workspace does not support geodatabase elements such as subtypes, domains, representations, topologies, geometric networks, network datasets, or &lt;STRONG&gt;feature datasets&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 20:05:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-update-connection-properties-to-in-memory/m-p/1019795#M59627</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-01-25T20:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to update connection properties to in memory source</title>
      <link>https://community.esri.com/t5/python-questions/how-to-update-connection-properties-to-in-memory/m-p/1019799#M59628</link>
      <description>&lt;P&gt;I am trying to use the newer `memory` workspace. Seems it has the same limitation and I missed it.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;This was what caught my eye:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;To display memory-based data in an&amp;nbsp;&lt;SPAN class="ph"&gt;ArcGIS Pro&lt;/SPAN&gt;&amp;nbsp;map, you can use the&amp;nbsp;&lt;SPAN class="usertext"&gt;memory&lt;/SPAN&gt;&amp;nbsp;workspace.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 20:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-update-connection-properties-to-in-memory/m-p/1019799#M59628</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-25T20:09:04Z</dc:date>
    </item>
  </channel>
</rss>

