<?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>idea Modify query layer data source using Python in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/modify-query-layer-data-source-using-python/idi-p/1537676</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/how-to-programmatically-change-the-data-source-for/m-p/1537106/highlight/true#M88116" target="_self"&gt;How to programmatically change the data source for a query layer?&lt;/A&gt;&amp;nbsp;from&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/791487"&gt;@Map12&lt;/a&gt;:&lt;/P&gt;&lt;P&gt;We are trying to change the data sources&amp;nbsp; for multiple query layers in multiple aprx files. We have run a test script that uses a template aprx and successfully changes the data source through the layer connection properties. However, when opening the new aprx, no data appears.&lt;/P&gt;&lt;P&gt;Once we open the properties for the query layer and make any edits to the query, it then "auto-validates" and data populates. This manual step of editing the query to prompt the query layer to "validate" defeats the purpose of scripting the data source change.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could Pro be enhanced so that we can modify a query layer’s data source using Python?&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2024 10:07:32 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-09-12T10:07:32Z</dc:date>
    <item>
      <title>Modify query layer data source using Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/modify-query-layer-data-source-using-python/idi-p/1537676</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/how-to-programmatically-change-the-data-source-for/m-p/1537106/highlight/true#M88116" target="_self"&gt;How to programmatically change the data source for a query layer?&lt;/A&gt;&amp;nbsp;from&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/791487"&gt;@Map12&lt;/a&gt;:&lt;/P&gt;&lt;P&gt;We are trying to change the data sources&amp;nbsp; for multiple query layers in multiple aprx files. We have run a test script that uses a template aprx and successfully changes the data source through the layer connection properties. However, when opening the new aprx, no data appears.&lt;/P&gt;&lt;P&gt;Once we open the properties for the query layer and make any edits to the query, it then "auto-validates" and data populates. This manual step of editing the query to prompt the query layer to "validate" defeats the purpose of scripting the data source change.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could Pro be enhanced so that we can modify a query layer’s data source using Python?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 10:07:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/modify-query-layer-data-source-using-python/idi-p/1537676</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-09-12T10:07:32Z</dc:date>
    </item>
  </channel>
</rss>

