<?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 Remap Broken Layers From File Geodatabase to SDE in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/remap-broken-layers-from-file-geodatabase-to-sde/m-p/1049268#M60846</link>
    <description>&lt;P&gt;I have a script which remaps broken feature class layers from file geodatabase to sde. It works fine, but there's something weird in the string for the remapped layers that I cannot figure out.&lt;/P&gt;&lt;P&gt;These are the broken file geodatabase layers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHolmes_0-1618938142356.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11356i0C80B9D7586E96E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHolmes_0-1618938142356.png" alt="ChrisHolmes_0-1618938142356.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The script remaps them correctly to sde, but I'm seeing this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHolmes_3-1618938652354.png" style="width: 625px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11361i4E3A4182A11EE07D/image-dimensions/625x86?v=v2" width="625" height="86" role="button" title="ChrisHolmes_3-1618938652354.png" alt="ChrisHolmes_3-1618938652354.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And what I want is this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHolmes_4-1618938982332.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11362i0251B810C376857D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHolmes_4-1618938982332.png" alt="ChrisHolmes_4-1618938982332.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Does anyone have any idea why the file geodatabase path is on the end?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;These are the properties I'm setting to remap the layers to sde:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHolmes_5-1618939574355.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11363i0C32E6666EF55BD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHolmes_5-1618939574355.png" alt="ChrisHolmes_5-1618939574355.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note that I have replaced the following properties with dummy values for the purposes of this thread: db_connection_properties; instance; server; user; dataset&lt;/P&gt;&lt;P&gt;Here is the procedure that is doing the work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def UpdateSdeConnectionProperties(self, fcName, brokenLayer, userN=None):
    new_conn_prop = brokenLayer.connectionProperties
    new_conn_prop['connection_info']['authentication_mode'] = self.sdeAuthMode
    new_conn_prop['connection_info']['db_connection_properties'] = self.sdeDbConnProps
    new_conn_prop['connection_info']['dbclient'] = self.sdeDbClient
    new_conn_prop['connection_info']['instance'] = self.sdeInstance
    new_conn_prop['connection_info']['projectInstance'] = self.sdeProjInstance
    new_conn_prop['connection_info']['server'] = self.sdeServer
    if userN is not None:
        new_conn_prop['connection_info']['user'] = userN
    new_conn_prop['connection_info']['version'] = self.sdeVersion
    new_conn_prop['dataset'] = fcName
    new_conn_prop['workspace_factory'] = self.sdeWsFactory
    # Update the connection properties dictionary of the layer
    brokenLayer.updateConnectionProperties(brokenLayer.connectionProperties,new_conn_prop)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for looking everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&lt;BR /&gt;&lt;DIV class="lia-progress-placeholder mceNonEditable"&gt;&lt;DIV class="lia-media-progress"&gt;&lt;DIV class="lia-progress-bar-stripes lia-progress-bar-animate lia-media-progress-bar"&gt;&lt;DIV class="lia-progress-bar"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;SPAN class="lia-progress-value"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&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>Tue, 20 Apr 2021 17:34:29 GMT</pubDate>
    <dc:creator>ChrisHolmes</dc:creator>
    <dc:date>2021-04-20T17:34:29Z</dc:date>
    <item>
      <title>Remap Broken Layers From File Geodatabase to SDE</title>
      <link>https://community.esri.com/t5/python-questions/remap-broken-layers-from-file-geodatabase-to-sde/m-p/1049268#M60846</link>
      <description>&lt;P&gt;I have a script which remaps broken feature class layers from file geodatabase to sde. It works fine, but there's something weird in the string for the remapped layers that I cannot figure out.&lt;/P&gt;&lt;P&gt;These are the broken file geodatabase layers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHolmes_0-1618938142356.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11356i0C80B9D7586E96E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHolmes_0-1618938142356.png" alt="ChrisHolmes_0-1618938142356.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The script remaps them correctly to sde, but I'm seeing this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHolmes_3-1618938652354.png" style="width: 625px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11361i4E3A4182A11EE07D/image-dimensions/625x86?v=v2" width="625" height="86" role="button" title="ChrisHolmes_3-1618938652354.png" alt="ChrisHolmes_3-1618938652354.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And what I want is this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHolmes_4-1618938982332.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11362i0251B810C376857D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHolmes_4-1618938982332.png" alt="ChrisHolmes_4-1618938982332.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Does anyone have any idea why the file geodatabase path is on the end?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;These are the properties I'm setting to remap the layers to sde:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisHolmes_5-1618939574355.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/11363i0C32E6666EF55BD3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisHolmes_5-1618939574355.png" alt="ChrisHolmes_5-1618939574355.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note that I have replaced the following properties with dummy values for the purposes of this thread: db_connection_properties; instance; server; user; dataset&lt;/P&gt;&lt;P&gt;Here is the procedure that is doing the work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def UpdateSdeConnectionProperties(self, fcName, brokenLayer, userN=None):
    new_conn_prop = brokenLayer.connectionProperties
    new_conn_prop['connection_info']['authentication_mode'] = self.sdeAuthMode
    new_conn_prop['connection_info']['db_connection_properties'] = self.sdeDbConnProps
    new_conn_prop['connection_info']['dbclient'] = self.sdeDbClient
    new_conn_prop['connection_info']['instance'] = self.sdeInstance
    new_conn_prop['connection_info']['projectInstance'] = self.sdeProjInstance
    new_conn_prop['connection_info']['server'] = self.sdeServer
    if userN is not None:
        new_conn_prop['connection_info']['user'] = userN
    new_conn_prop['connection_info']['version'] = self.sdeVersion
    new_conn_prop['dataset'] = fcName
    new_conn_prop['workspace_factory'] = self.sdeWsFactory
    # Update the connection properties dictionary of the layer
    brokenLayer.updateConnectionProperties(brokenLayer.connectionProperties,new_conn_prop)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for looking everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&lt;BR /&gt;&lt;DIV class="lia-progress-placeholder mceNonEditable"&gt;&lt;DIV class="lia-media-progress"&gt;&lt;DIV class="lia-progress-bar-stripes lia-progress-bar-animate lia-media-progress-bar"&gt;&lt;DIV class="lia-progress-bar"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;SPAN class="lia-progress-value"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&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>Tue, 20 Apr 2021 17:34:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/remap-broken-layers-from-file-geodatabase-to-sde/m-p/1049268#M60846</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2021-04-20T17:34:29Z</dc:date>
    </item>
  </channel>
</rss>

