<?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 Changing SDE data source using Python:  query layers vs feature layers in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/changing-sde-data-source-using-python-query-layers/m-p/34227#M2665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a bunch of MXD and I need to change the SDE connection in them using Python. These MXD include sde feature layers, sde tables and query layers.&lt;/P&gt;&lt;P&gt;For sde feature layers and tables replaceWorkspaces work as expected but it does not for query layers.&lt;/P&gt;&lt;P&gt;I tried with findAndReplaceWorkspacePaths and it works for query layers but NOT for sde feature layers.&lt;/P&gt;&lt;P&gt;So I guess I should combine both methods to get all the layers' connections changed, but this means changing the data source twice for every MXD. Isn't there a single method to do this all at once? I need all the process to be as fast as possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2016 09:29:43 GMT</pubDate>
    <dc:creator>AleydisG__Pere</dc:creator>
    <dc:date>2016-07-28T09:29:43Z</dc:date>
    <item>
      <title>Changing SDE data source using Python:  query layers vs feature layers</title>
      <link>https://community.esri.com/t5/python-questions/changing-sde-data-source-using-python-query-layers/m-p/34227#M2665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a bunch of MXD and I need to change the SDE connection in them using Python. These MXD include sde feature layers, sde tables and query layers.&lt;/P&gt;&lt;P&gt;For sde feature layers and tables replaceWorkspaces work as expected but it does not for query layers.&lt;/P&gt;&lt;P&gt;I tried with findAndReplaceWorkspacePaths and it works for query layers but NOT for sde feature layers.&lt;/P&gt;&lt;P&gt;So I guess I should combine both methods to get all the layers' connections changed, but this means changing the data source twice for every MXD. Isn't there a single method to do this all at once? I need all the process to be as fast as possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:29:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/changing-sde-data-source-using-python-query-layers/m-p/34227#M2665</guid>
      <dc:creator>AleydisG__Pere</dc:creator>
      <dc:date>2016-07-28T09:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SDE data source using Python:  query layers vs feature layers</title>
      <link>https://community.esri.com/t5/python-questions/changing-sde-data-source-using-python-query-layers/m-p/34228#M2666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if you detect the type of data source and apply the suitable method per layer type?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 11:21:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/changing-sde-data-source-using-python-query-layers/m-p/34228#M2666</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2016-07-28T11:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Changing SDE data source using Python:  query layers vs feature layers</title>
      <link>https://community.esri.com/t5/python-questions/changing-sde-data-source-using-python-query-layers/m-p/34229#M2667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may be wrong but my guess is that changing the data source for each layer separately will be slower.&lt;/P&gt;&lt;P&gt;Also, the only way to detect if a layer is a query layer is to look for the string '%' in its datasetName as mentioned &lt;A _jive_internal="true" href="https://community.esri.com/message/613281#comment-613281"&gt;here&lt;/A&gt;. I haven't tested it though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 12:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/changing-sde-data-source-using-python-query-layers/m-p/34229#M2667</guid>
      <dc:creator>AleydisG__Pere</dc:creator>
      <dc:date>2016-07-28T12:34:09Z</dc:date>
    </item>
  </channel>
</rss>

