jparkhill_FHI

Arcpy.da.insertcursor, Update, Delete and the Related Table Indexing of a Geometric Network

Discussion created by jparkhill_FHI on Feb 8, 2019
Latest reply on Feb 8, 2019 by rfairhur24

Could it be possible that the attached python script is breaking the link between parent-child related records? Is it possible that the arcpy.da.insertcursor does not play well with related tables in a geometric network? It would be a great help if you had the time to peer-review the code in the attached arcpy_Update.txt. 

 

The GIS tables are related to each other via Relationship Classes within a Geometric Network. It was noticed that the number of related records returned using the "Related Tables" selection tools is different than if a "Select By Attributes" query was used. This is an open ticket with esri, however, the thought is that it is the script that is causing the issue, and scripting is out of support scope. 

 

Should a "Reconcile/Compres/Rebuild Indexes/Analyze" be included after the arcpy.da.insertcursor before the Update and Delete records?

 

As with any code, this has been pieced together from many different, and valuable sources with a special thank you to Richard Fairhurst's blog post "Turbo Charging Data Manipulation with Python Cursors and Dictionaries": this script could not exist without the contents, comments and leads from that post.

 

My thanks in advance!

Attachments

Outcomes