<?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: Batch Export of rows in attribute Table in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1250458#M49914</link>
    <description>&lt;P&gt;I don't mess with models much, but suspect an interator would work here.&lt;/P&gt;&lt;P&gt;I'd use python and:&lt;/P&gt;&lt;P&gt;create an empty list&lt;/P&gt;&lt;P&gt;use search cursor to populate the list with all the values of the field&lt;/P&gt;&lt;P&gt;turn that list into a set (so is uniuqe without duplicates)&lt;/P&gt;&lt;P&gt;iterate through the list and pass that to the Select By Attributes&lt;/P&gt;&lt;P&gt;export.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fc = r'Database Connections\pathtofeatureclass'
search_field = 'AttField'
AttList = []
with arcpy.da.SearchCursor(fc, [search_field]) as cursor:
    for row in cursor:
       AttList.append(row[0])

AttSet = set(AttList)

for att in AttSet:
    where = f"{search_field} = '{att}'"
    arcpy.management.SelectLayerByAttribute(fc, "NEW_SELECTION", where)
    ## Export or other stuff&lt;/LI-CODE&gt;&lt;P&gt;Should work if running in Pro with fc loaded.&amp;nbsp; If not, will probably have to make feature layer first as the SelectByAttributes needs a view/layer not a feature class.&amp;nbsp; If so, could skip the SelectByAttributes and just pass the same where clause to the MakeFeatureLayer GP tool, then export the feature layer.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 17:39:09 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2023-01-23T17:39:09Z</dc:date>
    <item>
      <title>Batch Export of rows in attribute Table</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1249902#M49892</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working in ModelBuilder and having trouble exporting the data into individual features.&lt;/P&gt;&lt;P&gt;I have an attribute table with &amp;gt;500,000 polyliones, I have the grouped the polylines into ~250 groups and want to export each group as their own feature. My plan was to use the 'select layer by attribute' tool but how would I batch run this to export all features in one simple tool?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 15:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1249902#M49892</guid>
      <dc:creator>TimothyODoherty</dc:creator>
      <dc:date>2023-01-20T15:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Export of rows in attribute Table</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1249937#M49895</link>
      <description>&lt;P&gt;Sounds like the &lt;A href="https://pro.arcgis.com/en/pro-app/2.9/tool-reference/analysis/split-by-attributes.htm" target="_self"&gt;Split by Attributes tool&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 16:16:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1249937#M49895</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-01-20T16:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Export of rows in attribute Table</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1250315#M49908</link>
      <description>&lt;P&gt;Yes, I understand that Rhett. But what I am struggling with would be how to I run a 'Select by Attribute Tool' for each unique value in my field?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 09:44:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1250315#M49908</guid>
      <dc:creator>TimothyODoherty</dc:creator>
      <dc:date>2023-01-23T09:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Batch Export of rows in attribute Table</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1250458#M49914</link>
      <description>&lt;P&gt;I don't mess with models much, but suspect an interator would work here.&lt;/P&gt;&lt;P&gt;I'd use python and:&lt;/P&gt;&lt;P&gt;create an empty list&lt;/P&gt;&lt;P&gt;use search cursor to populate the list with all the values of the field&lt;/P&gt;&lt;P&gt;turn that list into a set (so is uniuqe without duplicates)&lt;/P&gt;&lt;P&gt;iterate through the list and pass that to the Select By Attributes&lt;/P&gt;&lt;P&gt;export.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fc = r'Database Connections\pathtofeatureclass'
search_field = 'AttField'
AttList = []
with arcpy.da.SearchCursor(fc, [search_field]) as cursor:
    for row in cursor:
       AttList.append(row[0])

AttSet = set(AttList)

for att in AttSet:
    where = f"{search_field} = '{att}'"
    arcpy.management.SelectLayerByAttribute(fc, "NEW_SELECTION", where)
    ## Export or other stuff&lt;/LI-CODE&gt;&lt;P&gt;Should work if running in Pro with fc loaded.&amp;nbsp; If not, will probably have to make feature layer first as the SelectByAttributes needs a view/layer not a feature class.&amp;nbsp; If so, could skip the SelectByAttributes and just pass the same where clause to the MakeFeatureLayer GP tool, then export the feature layer.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 17:39:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/batch-export-of-rows-in-attribute-table/m-p/1250458#M49914</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-01-23T17:39:09Z</dc:date>
    </item>
  </channel>
</rss>

