<?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 use python to reset featuredataset\featureclass data source in a map layer to be in different workspace and with a different owner. in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/how-to-use-python-to-reset-featuredataset/m-p/7226#M36</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The&amp;nbsp;arcpy&amp;nbsp;layer function&amp;nbsp;layer.replaceDataSource(targetworkspace, "SDE_WORKSPACE",newDataset, False) works perfect when the newDataset is a SDE feature class. But it does not work with feature dataset\featureclass. For example, if I want to reset a layer's data source from sde1.sde\OWNER1.featuredataset\OWNER1.featureclass to sde2.sde\OWNER2.featuredataset\OWNER2.featureclass, the following&amp;nbsp;function call&amp;nbsp;does not work:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;layer.replaceDataSource(sde2.sde, "SDE_WORKSPACE","OWNER2.featuredataset\OWNER2.featureclass, False) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It changes the layer's target sde&amp;nbsp;workspace to sde2.sde, but does not change the dataset owner to be OWNER2.&amp;nbsp; The layer.dataSource is "sde2.sde\OWNER1.featuredataset\OWNER1.featureclass", rather than "sde2.sde\OWNER2.featuredataset\OWNER2.featureclass" which is what I expect to be. Any idea how to do this correctly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Feb 2017 20:03:14 GMT</pubDate>
    <dc:creator>AllenGuan1</dc:creator>
    <dc:date>2017-02-24T20:03:14Z</dc:date>
    <item>
      <title>How to use python to reset featuredataset\featureclass data source in a map layer to be in different workspace and with a different owner.</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-use-python-to-reset-featuredataset/m-p/7226#M36</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The&amp;nbsp;arcpy&amp;nbsp;layer function&amp;nbsp;layer.replaceDataSource(targetworkspace, "SDE_WORKSPACE",newDataset, False) works perfect when the newDataset is a SDE feature class. But it does not work with feature dataset\featureclass. For example, if I want to reset a layer's data source from sde1.sde\OWNER1.featuredataset\OWNER1.featureclass to sde2.sde\OWNER2.featuredataset\OWNER2.featureclass, the following&amp;nbsp;function call&amp;nbsp;does not work:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;layer.replaceDataSource(sde2.sde, "SDE_WORKSPACE","OWNER2.featuredataset\OWNER2.featureclass, False) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It changes the layer's target sde&amp;nbsp;workspace to sde2.sde, but does not change the dataset owner to be OWNER2.&amp;nbsp; The layer.dataSource is "sde2.sde\OWNER1.featuredataset\OWNER1.featureclass", rather than "sde2.sde\OWNER2.featuredataset\OWNER2.featureclass" which is what I expect to be. Any idea how to do this correctly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 20:03:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-use-python-to-reset-featuredataset/m-p/7226#M36</guid>
      <dc:creator>AllenGuan1</dc:creator>
      <dc:date>2017-02-24T20:03:14Z</dc:date>
    </item>
  </channel>
</rss>

