<?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: Script to load multiple features into already existing feature class? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570127#M44713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can improve performance by using the cursors in the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/What_is_the_data_access_module/018w00000008000000/"&gt;data access module&lt;/A&gt;‌. So, &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/SearchCursor/018w00000011000000/"&gt;arcpy.da.SearchCursor&lt;/A&gt; rather than arcpy.SearchCursor, and &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/InsertCursor/018w0000000t000000/"&gt;arcpy.da.InsertCursor&lt;/A&gt; rather than arcpy.InsertCursor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 19:44:58 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2014-08-28T19:44:58Z</dc:date>
    <item>
      <title>Script to load multiple features into already existing feature class?</title>
      <link>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570125#M44711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an existing feature class in a file gdb.&amp;nbsp; I am trying to write a python script to load data from a SQL2012 gdb.&amp;nbsp; I am new to this.&amp;nbsp; Normally, I would just drop a tool into modelbuilder and convert it to a python script.&amp;nbsp; However, I do not know how to do this with the Simple data loader that I use in ArcCatalog.&amp;nbsp; I would think that someone has already done this.&amp;nbsp; Any help is appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 17:26:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570125#M44711</guid>
      <dc:creator>SharonLitteral</dc:creator>
      <dc:date>2014-08-06T17:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script to load multiple features into already existing feature class?</title>
      <link>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570126#M44712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, so I wrote the script to load or append data to an existing feature class.&amp;nbsp; First, I use arcpy.ListFeatureClasses and get a list of the feature classes from my source feature dataset.&amp;nbsp;&amp;nbsp; I then loop through each one of the feature classes in the list above and:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.&amp;nbsp; Use arcpy.Describe and create a list containing all of the field names in the source&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Use arcpy.SearchCursor on my source feature dataset and for each row in this cursor I loop through and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. Use arcpy.InsertCursor.newRow and create a new row in my target dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. Then for each field name in the list of field names from 1. above I loop through and populate that field value in my&amp;nbsp; new row with the value from the source (I use getValue and setValue)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5. Finally, I use the InsertCursor from 3. above and use the method insertRow to update the row in my target database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6. I clean up my cursors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This all works, however it takes a long time to do this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any experience with tuning the python performance or suggestions for how to modify my logic above to increase performance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 19:20:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570126#M44712</guid>
      <dc:creator>SharonLitteral</dc:creator>
      <dc:date>2014-08-28T19:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Script to load multiple features into already existing feature class?</title>
      <link>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570127#M44713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can improve performance by using the cursors in the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/What_is_the_data_access_module/018w00000008000000/"&gt;data access module&lt;/A&gt;‌. So, &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/SearchCursor/018w00000011000000/"&gt;arcpy.da.SearchCursor&lt;/A&gt; rather than arcpy.SearchCursor, and &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/InsertCursor/018w0000000t000000/"&gt;arcpy.da.InsertCursor&lt;/A&gt; rather than arcpy.InsertCursor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 19:44:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570127#M44713</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2014-08-28T19:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script to load multiple features into already existing feature class?</title>
      <link>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570128#M44714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note the parameter order changes slightly between da Cursors and standard Cursors&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 19:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570128#M44714</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2014-08-28T19:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Script to load multiple features into already existing feature class?</title>
      <link>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570129#M44715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;^ their entire use is quite different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 19:52:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-load-multiple-features-into-already/m-p/570129#M44715</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2014-08-28T19:52:58Z</dc:date>
    </item>
  </channel>
</rss>

