<?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: Calculating a field in a versioned geodatabase.  What is the best method? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calculating-a-field-in-a-versioned-geodatabase/m-p/491455#M38508</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the arcpy.da module will be much faster.&amp;nbsp; Ex:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;cursor = arcpy.da.UpdateCursor(fc, ["AnnotationClassID","SymbolID"])
for row in cursor:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = row[1] 
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row) &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before running this script, I would recommend creating a database backup.&amp;nbsp; Also, after the edits are complete, it will be best to perform a reconcile/post, &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000s5000000" rel="nofollow noopener noreferrer" target="_blank"&gt;compress&lt;/A&gt;, and &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//01900000000q000000" rel="nofollow noopener noreferrer" target="_blank"&gt;analyze of the datasets&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:37:51 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2021-12-11T21:37:51Z</dc:date>
    <item>
      <title>Calculating a field in a versioned geodatabase.  What is the best method?</title>
      <link>https://community.esri.com/t5/python-questions/calculating-a-field-in-a-versioned-geodatabase/m-p/491453#M38506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to update one field, AnnotationClassID, for all annotation in our versioned SDE.&amp;nbsp; There are close to a million records in a half dozen feature classes.&amp;nbsp; What are the ramifications of using the arcpy.da module to do this task? Curious to know how others have handled this task.&amp;nbsp; Below is a basic sketch of what I had in mind.&amp;nbsp; Many Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import os

fc = r'X:\Database connection to vm-sql3.sde\Anno0100scale'
workspace = os.path.dirname(fc)

edit = arcpy.da.Editor(workspace)
edit.startEditing(False, True)
edit.startOperation()

cursor = arcpy.UpdateCursor(fc, ["AnnotationClassID","SymbolID"])
for row in cursor:
&amp;nbsp; row.AnnotationClassID = row.SymbolID
&amp;nbsp; cursor.updateRow(row)

edit.stopOperation()
edit.stopEditing(True)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculating-a-field-in-a-versioned-geodatabase/m-p/491453#M38506</guid>
      <dc:creator>AdamCrateau1</dc:creator>
      <dc:date>2021-12-11T21:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating a field in a versioned geodatabase.  What is the best method?</title>
      <link>https://community.esri.com/t5/python-questions/calculating-a-field-in-a-versioned-geodatabase/m-p/491454#M38507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;great&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2015 06:22:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculating-a-field-in-a-versioned-geodatabase/m-p/491454#M38507</guid>
      <dc:creator>GloriaTshokama</dc:creator>
      <dc:date>2015-04-06T06:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating a field in a versioned geodatabase.  What is the best method?</title>
      <link>https://community.esri.com/t5/python-questions/calculating-a-field-in-a-versioned-geodatabase/m-p/491455#M38508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the arcpy.da module will be much faster.&amp;nbsp; Ex:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;cursor = arcpy.da.UpdateCursor(fc, ["AnnotationClassID","SymbolID"])
for row in cursor:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = row[1] 
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row) &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before running this script, I would recommend creating a database backup.&amp;nbsp; Also, after the edits are complete, it will be best to perform a reconcile/post, &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000s5000000" rel="nofollow noopener noreferrer" target="_blank"&gt;compress&lt;/A&gt;, and &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//01900000000q000000" rel="nofollow noopener noreferrer" target="_blank"&gt;analyze of the datasets&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:37:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculating-a-field-in-a-versioned-geodatabase/m-p/491455#M38508</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T21:37:51Z</dc:date>
    </item>
  </channel>
</rss>

