<?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 Re: Unable to update attribute alias of &amp;quot;Query Layers&amp;quot; in mxd using ArcPY in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486954#M38015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My experience has been there isn't much support for Query Layers in ArcPy.&amp;nbsp; A while back I needed to build a GP tool that would update query layer definitions based on database name/schema changes between Dev, Test and Prod environments, but there doesn't seem to be any support for that kind of thing in ArcPy. (I'm not sure there's even a reliable way to distinguish between query layers and regular EGDB layers in a map document.)&amp;nbsp; Ultimately ended up building the GP tool using ArcObjects, where there are interfaces like &lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IQueryDescription_Interface/0025000006m2000000/"&gt;IQueryDescription&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Feb 2018 16:28:32 GMT</pubDate>
    <dc:creator>JamesMacKay3</dc:creator>
    <dc:date>2018-02-12T16:28:32Z</dc:date>
    <item>
      <title>Unable to update attribute alias of "Query Layers" in mxd using ArcPY</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486948#M38009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to create a python script that can &lt;STRONG&gt;update attribute alias of "Query Layers"&lt;/STRONG&gt; added in MXD.&lt;/P&gt;&lt;P&gt;arcpy.AlterField_management throws&amp;nbsp;&lt;EM&gt;ERROR 001601: Failed to alter field alias. Failed to execute (AlterField).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Any Help or suggestions are appreciable!&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 11:22:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486948#M38009</guid>
      <dc:creator>Prasoonmaheshwari</dc:creator>
      <dc:date>2018-02-12T11:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to update attribute alias of "Query Layers" in mxd using ArcPY</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486949#M38010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is Query Layers a layer in a Geodatabase table?&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/alter-field-properties.htm"&gt;http://pro.arcgis.com/en/pro-app/tool-reference/data-management/alter-field-properties.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The error means that the alias is invalid and says to try another one&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-01601-01625-001601.htm"&gt;http://pro.arcgis.com/en/pro-app/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-01601-01625-001601.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;which may mean that the alias is a reserved word or it exists or a number of other reasons...&lt;/P&gt;&lt;P&gt;Try 'ABC' and see if that works as a test&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 12:16:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486949#M38010</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-02-12T12:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to update attribute alias of "Query Layers" in mxd using ArcPY</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486950#M38011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder if&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/alter-field-properties.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/alter-field-properties.htm"&gt;Alter Field—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;supports a Query Layer. Can you post you&amp;nbsp;have tried?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 12:18:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486950#M38011</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2018-02-12T12:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to update attribute alias of "Query Layers" in mxd using ArcPY</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486951#M38012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Query Layer is a geodatabase view. I have already tried alias name like "XYZ"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 12:24:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486951#M38012</guid>
      <dc:creator>Prasoonmaheshwari</dc:creator>
      <dc:date>2018-02-12T12:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to update attribute alias of "Query Layers" in mxd using ArcPY</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486952#M38013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As in the help link...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;This tool provides the ability to rename fields or rename field aliases for any geodatabase table or feature class. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;I suspect you are going to have to go directly to &lt;A href="http://pro.arcgis.com/en/pro-app/help/data/query-layers/modifying-a-query-layer.htm"&gt;Modify a query layer&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 13:45:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486952#M38013</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-02-12T13:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to update attribute alias of "Query Layers" in mxd using ArcPY</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486953#M38014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By "geodatabase view," I interpret that as a database view that has been registered with a geodatabase.&amp;nbsp; Are you creating or working with a query layer defined against the geodatabase view above?&amp;nbsp; Query layers work best for enterprise databases that are not geodatabases, so if you have already registered a view with the geodatabase, why load it into ArcMap using a query layer instead of a regular layer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 15:28:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486953#M38014</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-02-12T15:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to update attribute alias of "Query Layers" in mxd using ArcPY</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486954#M38015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My experience has been there isn't much support for Query Layers in ArcPy.&amp;nbsp; A while back I needed to build a GP tool that would update query layer definitions based on database name/schema changes between Dev, Test and Prod environments, but there doesn't seem to be any support for that kind of thing in ArcPy. (I'm not sure there's even a reliable way to distinguish between query layers and regular EGDB layers in a map document.)&amp;nbsp; Ultimately ended up building the GP tool using ArcObjects, where there are interfaces like &lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IQueryDescription_Interface/0025000006m2000000/"&gt;IQueryDescription&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:28:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/486954#M38015</guid>
      <dc:creator>JamesMacKay3</dc:creator>
      <dc:date>2018-02-12T16:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to update attribute alias of "Query Layers" in mxd using ArcPY</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/1662538#M74830</link>
      <description>&lt;P&gt;Anyone have any luck with doing this in Pro?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2025 15:45:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-update-attribute-alias-of-quot-query/m-p/1662538#M74830</guid>
      <dc:creator>drunneals_cgs</dc:creator>
      <dc:date>2025-10-31T15:45:35Z</dc:date>
    </item>
  </channel>
</rss>

