<?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 TableCompare_management throwing error on 'hidden' native SQL field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/tablecompare-management-throwing-error-on-hidden/m-p/415595#M32725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm attempting to use arcpy.TableCompare_management and am passing tables that have a SHAPE.STLength() field, since we're using SQL Server Native spatial types.&amp;nbsp; I include 'SHAPE.STLength()' in my "omit fields list", but it throws the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
omitFields = ["SHAPE_Length", "SHAPE.len", "SHAPE", "OBJECTID", "SHAPE.STLength()", "STLength__"]
arcpy.TableCompare_management(baseTable, testTable, "OBJECTID", "SCHEMA_ONLY", "", "", omitFields, "CONTINUE_COMPARE", "")
ExecuteError: ERROR 000622: Failed to execute (TableCompare). Parameters are not valid.
ERROR 000800: The value is not a member of OBJECTID | AUTOCAD_LAYER | PIPENO | ASSETNUMBER | SHAPE | SHAPE.len | SHAPE.STLength().
ERROR 000800: The value is not a member of OBJECTID | AUTOCAD_LAYER | PIPENO | ASSETNUMBER | SHAPE | SHAPE.len | SHAPE.STLength().
Failed to execute (TableCompare).
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I run TableCompare in ArcCatalog, the field shows up in the list of available fields to omit, and when I do so it works fine.&amp;nbsp; If I do an arcpy.ListFields on the feature classes, it correctly shows me the SHAPE.STLength() field:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;SHAPE.STLength() is a type of Double with a length of 0&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts on how I can get arcpy.TableCompare_management to work as I need it to?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2012 05:53:39 GMT</pubDate>
    <dc:creator>ChrisBeaudette</dc:creator>
    <dc:date>2012-10-30T05:53:39Z</dc:date>
    <item>
      <title>TableCompare_management throwing error on 'hidden' native SQL field</title>
      <link>https://community.esri.com/t5/python-questions/tablecompare-management-throwing-error-on-hidden/m-p/415595#M32725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm attempting to use arcpy.TableCompare_management and am passing tables that have a SHAPE.STLength() field, since we're using SQL Server Native spatial types.&amp;nbsp; I include 'SHAPE.STLength()' in my "omit fields list", but it throws the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
omitFields = ["SHAPE_Length", "SHAPE.len", "SHAPE", "OBJECTID", "SHAPE.STLength()", "STLength__"]
arcpy.TableCompare_management(baseTable, testTable, "OBJECTID", "SCHEMA_ONLY", "", "", omitFields, "CONTINUE_COMPARE", "")
ExecuteError: ERROR 000622: Failed to execute (TableCompare). Parameters are not valid.
ERROR 000800: The value is not a member of OBJECTID | AUTOCAD_LAYER | PIPENO | ASSETNUMBER | SHAPE | SHAPE.len | SHAPE.STLength().
ERROR 000800: The value is not a member of OBJECTID | AUTOCAD_LAYER | PIPENO | ASSETNUMBER | SHAPE | SHAPE.len | SHAPE.STLength().
Failed to execute (TableCompare).
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I run TableCompare in ArcCatalog, the field shows up in the list of available fields to omit, and when I do so it works fine.&amp;nbsp; If I do an arcpy.ListFields on the feature classes, it correctly shows me the SHAPE.STLength() field:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;SHAPE.STLength() is a type of Double with a length of 0&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts on how I can get arcpy.TableCompare_management to work as I need it to?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 05:53:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tablecompare-management-throwing-error-on-hidden/m-p/415595#M32725</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2012-10-30T05:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: TableCompare_management throwing error on 'hidden' native SQL field</title>
      <link>https://community.esri.com/t5/python-questions/tablecompare-management-throwing-error-on-hidden/m-p/415596#M32726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Never have this problem, but usually in cases like this I put tool to model builder and then export to python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then copy this to your script and make cosmetics &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Arek&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 10:17:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tablecompare-management-throwing-error-on-hidden/m-p/415596#M32726</guid>
      <dc:creator>ArkadiuszMatoszka</dc:creator>
      <dc:date>2012-10-30T10:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: TableCompare_management throwing error on 'hidden' native SQL field</title>
      <link>https://community.esri.com/t5/python-questions/tablecompare-management-throwing-error-on-hidden/m-p/415597#M32727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Excellent!&amp;nbsp; Should've thought of that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Got it working.&amp;nbsp; Turns out defining the fields to omit as a semi-colon-separated string instead of a list worked for me.&amp;nbsp; I.e this didn't work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;omitFields = ["SHAPE_Length", "SHAPE.len", "SHAPE", "OBJECTID", "SHAPE.STLength()"]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this worked:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"OBJECTID;SHAPE;SHAPE.STLength();SHAPE.len"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What's more (and probably more relevant) is that the fields in the list of fields to omit must actually be in one of the feature classes being compared, i.e. you can't throw a bunch of fields in the omit list "just in case" they're in the feature classes.&amp;nbsp; If you include a field that's not in one of the feature classes, you get the "ERROR 000800".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So still not sure how/if this will work effectively if I throw a bunch of feature classes at it that have native SQL Server geometry types, since having that seems to create many oddly-named fields.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 13:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/tablecompare-management-throwing-error-on-hidden/m-p/415597#M32727</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2012-10-30T13:23:53Z</dc:date>
    </item>
  </channel>
</rss>

