<?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: delete/append order of operation with relationships. in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1382196#M8872</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/765531"&gt;@danaharre&lt;/a&gt;&amp;nbsp;I'm not sure what you mean by wrapping the update operations in a transaction, can you give me an example?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 14:35:38 GMT</pubDate>
    <dc:creator>clt_cabq</dc:creator>
    <dc:date>2024-02-14T14:35:38Z</dc:date>
    <item>
      <title>delete/append order of operation with relationships.</title>
      <link>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1378664#M8861</link>
      <description>&lt;P&gt;Is there an order of operations requirement when updating a feature class and related table - such as, do you have to update a feature class first before the related table? I have a geodatabase (sql server backend) with a feature class and a related (1:M) table that I update once a month. I run (manually) a delete/append operation against both of these items after I've updated data in a staging database. I use truncate table to delete the existing rows in the gdb table. I always inspect the table to make sure all records match the source table, especially the field that is used to relate to the feature class. I've found that I can inspect the table and find all values in the related field have updated, but then after I run the delete/append on the feature class, it appears those related values in the table 'disappear' everytime. For instance I ran this update today and had 0 null values in the relate field before updating the feature class but afterwards there were about 96K out of 98K records with null values in the related field in the table. Typically I am running the truncate/append operation first, then the delete/append on the feature class, and if i redo the truncate/append process a second time, everything comes through with no issues.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 15:35:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1378664#M8861</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-02-06T15:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: delete/append order of operation with relationships.</title>
      <link>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1378747#M8862</link>
      <description>&lt;P&gt;You should&lt;/P&gt;&lt;P&gt;1. truncate the related table&lt;/P&gt;&lt;P&gt;2. then truncate the featureclass&lt;/P&gt;&lt;P&gt;3. then reload the data&lt;/P&gt;&lt;P&gt;4. load the featureclass&lt;/P&gt;&lt;P&gt;5. load the related table&lt;BR /&gt;&lt;BR /&gt;If the geodatabase relationship class 1:M is based on GUI values then nothing to worry.&lt;/P&gt;&lt;P&gt;If you are using ObjectID then you might need to preserve the original objectid value in the featureclass as a new field e.g orig_oid and preserve the related table foreign key value as a new field as well e.g orig_oid_fk, then you can repopulate the related table foreign key value with the new objectid of the featureclass using the original ObjectID values.&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 17:20:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1378747#M8862</guid>
      <dc:creator>MarceloMarques</dc:creator>
      <dc:date>2024-02-06T17:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: delete/append order of operation with relationships.</title>
      <link>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1378837#M8864</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7880"&gt;@MarceloMarques&lt;/a&gt;&amp;nbsp;thanks! I'll try this approach next time around. The related field is neither the GUID or Object ID but a unique parcel value.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 20:07:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1378837#M8864</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-02-06T20:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: delete/append order of operation with relationships.</title>
      <link>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1382196#M8872</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/765531"&gt;@danaharre&lt;/a&gt;&amp;nbsp;I'm not sure what you mean by wrapping the update operations in a transaction, can you give me an example?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 14:35:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1382196#M8872</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-02-14T14:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: delete/append order of operation with relationships.</title>
      <link>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1382285#M8873</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/663332"&gt;@clt_cabq&lt;/a&gt;&amp;nbsp;- RDBMS Transactions, see SQL Server example&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/sql/t-sql/language-elements/begin-transaction-transact-sql?view=sql-server-ver16" target="_blank" rel="noopener"&gt;BEGIN TRANSACTION (Transact-SQL) - SQL Server | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Oracle, SQL Server, PostgreSQL support Transactions.&lt;BR /&gt;&lt;BR /&gt;And if you are using ArcGIS Pro Python ArcPy or the ArcGIS Pro .NET SDK then the API also has methods to work with transactions.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/python-questions/arcpy-editor-transaction-rollback/td-p/39711" target="_blank"&gt;Arcpy editor transaction rollback - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 16:40:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1382285#M8873</guid>
      <dc:creator>MarceloMarques</dc:creator>
      <dc:date>2024-02-14T16:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: delete/append order of operation with relationships.</title>
      <link>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1382322#M8874</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7880"&gt;@MarceloMarques&lt;/a&gt;,&amp;nbsp;currently I'm running this simply in a manual set of procedures, but one of my upcoming tasks is to automate this (using python) as the last step of several procedures, so these references really help.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 17:23:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1382322#M8874</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-02-14T17:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: delete/append order of operation with relationships.</title>
      <link>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1390401#M8953</link>
      <description>&lt;P&gt;Just reporting back - i followed this sequence in my manual processing of these data this morning and it worked perfectly well. Next steps are to automate this process so the comments about wrapping this into a transaction will be helpful.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 15:16:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/delete-append-order-of-operation-with/m-p/1390401#M8953</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-03-04T15:16:11Z</dc:date>
    </item>
  </channel>
</rss>

