<?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 List of all columns in FGDB using SQL query in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/list-of-all-columns-in-fgdb-using-sql-query/idi-p/1527974</link>
    <description>&lt;P&gt;It would be great if we could use an SQL query, such as a database view, to get a &lt;STRONG&gt;list of all fields&lt;/STRONG&gt; in all tables in a file geodatabase, including the field properties.&lt;/P&gt;&lt;P&gt;That would help with data management requirements like&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/identify-feature-classes-with-64-bit-objectid/m-p/1527935/highlight/true#M87525" target="_self"&gt;Identify Feature Classes with 64-bit ObjectID&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For reference, this can be done in enterprise geodatabases by querying the geodatabase system tables. Or by querying a native database table/view such as Oracle's&amp;nbsp;&lt;A href="https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/USER_TAB_COLUMNS.html" target="_self"&gt;USER_TAB_COLUMNS&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1724776490424.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113628iF3481528461A0441/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1724776490424.png" alt="Bud_0-1724776490424.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2024 16:36:46 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-08-27T16:36:46Z</dc:date>
    <item>
      <title>List of all columns in FGDB using SQL query</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/list-of-all-columns-in-fgdb-using-sql-query/idi-p/1527974</link>
      <description>&lt;P&gt;It would be great if we could use an SQL query, such as a database view, to get a &lt;STRONG&gt;list of all fields&lt;/STRONG&gt; in all tables in a file geodatabase, including the field properties.&lt;/P&gt;&lt;P&gt;That would help with data management requirements like&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/identify-feature-classes-with-64-bit-objectid/m-p/1527935/highlight/true#M87525" target="_self"&gt;Identify Feature Classes with 64-bit ObjectID&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For reference, this can be done in enterprise geodatabases by querying the geodatabase system tables. Or by querying a native database table/view such as Oracle's&amp;nbsp;&lt;A href="https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/USER_TAB_COLUMNS.html" target="_self"&gt;USER_TAB_COLUMNS&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1724776490424.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113628iF3481528461A0441/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1724776490424.png" alt="Bud_0-1724776490424.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 16:36:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/list-of-all-columns-in-fgdb-using-sql-query/idi-p/1527974</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-08-27T16:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: List of all columns in FGDB using SQL query</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/list-of-all-columns-in-fgdb-using-sql-query/idc-p/1528019#M31816</link>
      <description>&lt;P&gt;For full SQL functionality, maintaining data in an enterprise geodatabase is advised.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In File Geodatabase the easiest way to achieve this is with a Schema Report. The 'Fields' mega-sheet will give you information about every field in the geodatabase.&lt;BR /&gt;&lt;BR /&gt;1. Generate a schema report of your geodatabase.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Navigate to the Fields mega-sheet which contains the property information for all fields in the geodatabase&lt;/P&gt;&lt;P&gt;3. Sort the table by field type to group all Object ID fields together.&lt;/P&gt;&lt;P&gt;4. Take note of whether the OID field length is 4 ( standard OID ) or 8 ( 64 bit OID )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Describing the Workspace and then drilling into the fields will also allow you to build something like this without a ton of code.&amp;nbsp; Building a complete list of all field objects and their properties can be done like below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fields_list = list()

for workspace in arcpy.da.Walk(geodatabase):
    desc = arcpy.Describe(workspace[0])

    for child in desc.children:
       if hasattr(child, 'fields'):
            fields_list.extend(child.fields)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/table-properties.htm" target="_self" rel="nofollow noopener noreferrer"&gt;Describe Documentation&amp;nbsp;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 17:35:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/list-of-all-columns-in-fgdb-using-sql-query/idc-p/1528019#M31816</guid>
      <dc:creator>SSWoodward</dc:creator>
      <dc:date>2024-08-27T17:35:19Z</dc:date>
    </item>
  </channel>
</rss>

