<?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 Problem with arcpy.describe in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529441#M41468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing the next problem:&lt;/P&gt;&lt;P&gt;- I have a feature datasatet and a table in a geodatabase, both with the same name (lets say "object1"). It seems not to be any restriction for this.&lt;/P&gt;&lt;P&gt;- However, when I try to get the description (arcpy.Describe) using this common name "object1" I always get the description of the feature dataset and I am not able to access to the description of the table.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any workaround?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jesús de Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Aug 2015 11:58:03 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2015-08-11T11:58:03Z</dc:date>
    <item>
      <title>Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529441#M41468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing the next problem:&lt;/P&gt;&lt;P&gt;- I have a feature datasatet and a table in a geodatabase, both with the same name (lets say "object1"). It seems not to be any restriction for this.&lt;/P&gt;&lt;P&gt;- However, when I try to get the description (arcpy.Describe) using this common name "object1" I always get the description of the feature dataset and I am not able to access to the description of the table.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any workaround?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jesús de Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 11:58:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529441#M41468</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-08-11T11:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529442#M41469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your table inside your dataset with the same name? You need to provide the full path "database\dataset\table"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 12:43:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529442#M41469</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-08-11T12:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529443#M41470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that tables can't be added to feature datasets....Anyway, in my case, the table is outside any feature dataset.&lt;/P&gt;&lt;P&gt;Following your path example:&lt;/P&gt;&lt;P&gt;Path for the table:&lt;/P&gt;&lt;P&gt;"Database\Table"&lt;/P&gt;&lt;P&gt;Path for the Feature Dataset:&lt;/P&gt;&lt;P&gt;"Database\Feature Dataset"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.... the same....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you anyway&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jesús de Diego&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 13:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529443#M41470</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-08-11T13:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529444#M41471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;True, tables do not have spatial data and cannot be stored in a &lt;SPAN style="text-decoration: underline;"&gt;feature&lt;/SPAN&gt; Dataset. I would recommend renaming the table and make sure that all the elements in your gdb have a unique name. Also if you would want to start a cursor on the table, it will not find the table (since it will encounter the feature dataset with that name first) and throws an error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 13:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529444#M41471</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-08-11T13:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529445#M41472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't think you could have any elements with the same name in a gdb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 15:21:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529445#M41472</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2015-08-11T15:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529446#M41473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact you can:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/121898_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;... and:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/121899_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;... but you can't have a table and a featureclass with the same name or have two featureclasses with the same name although the reside in different feature datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Describe functionality can be applied to both the featureclass and the feature dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; desc1 = arcpy.Describe(r"D:\Xander\GeoNet\Describe\test2.gdb\SomeName")
&amp;gt;&amp;gt;&amp;gt; desc1.datasetType
u'FeatureDataset'
&lt;SPAN style="line-height: 1.5;"&gt;&amp;gt;&amp;gt;&amp;gt; desc2 = arcpy.Describe(r"D:\Xander\GeoNet\Describe\test2.gdb\SomeName\SomeName")&lt;/SPAN&gt;
&lt;SPAN style="line-height: 1.5;"&gt;&amp;gt;&amp;gt;&amp;gt; desc2.datasetType&lt;/SPAN&gt;
u'FeatureClass'&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... for the table and feature dataset, you can't since they are referenced the same way. If the Featureclass would reside outside the feature dataset, the same would apply for the featureclass, not being able to be described:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/121900_pastedImage_3.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; desc3 = arcpy.Describe(r"D:\Xander\GeoNet\Describe\test.gdb\Information")
&amp;gt;&amp;gt;&amp;gt; desc3.datasetType
u'FeatureDataset'&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:03:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529446#M41473</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T23:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529447#M41474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With this in mind, you could either rename your geodatabase table and dataset so they are unique, or &lt;A href="http://resources.arcgis.com/EN/HELP/MAIN/10.2/0017/00170000006v000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;make a table view&lt;/A&gt; of the table using a where clause that will not return any rows (for speed/performance) and do a describe on the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;where_clause = "1=0"&amp;nbsp; ## Intentionally will not return any rows
arcpy.MakeTableView_management(inTable, "outTableView", where_clause)
descView = arcpy.Describe("outTableView")
print descView.name, descView.datasetType&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529447#M41474</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-12-11T23:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529448#M41475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If renaming the table is not an option than the snippet provided by &lt;A href="https://community.esri.com/migrated-users/48550"&gt;Blake T&lt;/A&gt; will offer the best solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 11:39:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529448#M41475</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-08-12T11:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with arcpy.describe</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529449#M41476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not saying this is any better than &lt;A href="https://community.esri.com/migrated-users/48550" target="_blank"&gt;Blake T&lt;/A&gt;​'s approach, but there is an arcpy.Describe only approach:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;gdb = #path to geodatabase
for child in arcpy.Describe(gdb).children:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if child.name == 'someName' and child.datasetType == 'Table':
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc = child
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:03:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-arcpy-describe/m-p/529449#M41476</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T23:03:33Z</dc:date>
    </item>
  </channel>
</rss>

