Select to view content in your preferred language

Update feature classes with relationship class

550
2
03-04-2024 02:57 PM
Labels (2)
ChenChen4
Regular Contributor

I have two feature classes and a relationship class that connects them.  The data are stored on an Enterprise Geodatabase and I need to refresh the two feature classes weekly. My original thought was to perform a simple truncate and append, but the truncate operation returns an "160592: Truncation not allowed while editing" error. The data are not versioned and are not in editing. Tried arcpy but got the same results. Tried Delete Rows and it worked but I do not want the ever growing objectids.  Tested in ArcGIS Pro 2.7, 2.8, 2.9, 3.1, and 3.2. Can anyone recommend a correct workflow to achieve the goal? 

 

0 Kudos
2 Replies
MarceloMarques
Esri Regular Contributor

@ChenChen4 - if the relationship class is 1:1 or 1:M and goes from FC_A to FC_B then try to truncate FC_B first then FC_A last, if still not successful then try to drop the relationship class and try the truncate again, also make sure that no ArcGIS Server services nor users are connected to the geodatabase or you will not be able to truncate because of locks.
Truncate Table (Data Management)—ArcGIS Pro | Documentation
also notice that to use truncate the geodatabase connection must be with the data owner user.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
0 Kudos
ChenChen4
Regular Contributor

Thanks for the input. It is 1:M relationship and I have to drop relationship first then do truncate and append. 

0 Kudos