Hi everyone,
I'm working with Esri Utility Network on ArcGIS Pro 3.3.1 and I have a technical question about a specific behavior I keep running into during the Asset Package deploy process.
**Background**
My typical workflow is:
1. Deploy the Utility Network from an Asset Package using the Asset Package To Geodatabase tool.
2. Go back to the Asset Package to make configuration changes.
3. Re-run Asset Package To Geodatabase against the same geodatabase.
At step 3, the ImportAssociations step consistently fails with:
> ERROR 160874: The utility network association already exists.
> [Duplicate association found. Association with FROMGLOBALID: {…} and TOGLOBALID: {…}]
> Failed to execute (ImportAssociations).
My questions
1. What is the exact relationship between the two tables involved?
As I understand it:
- `UN_5_Associations` is the internal system table of the Utility Network, managed by ArcGIS, holding all active associations (connectivity, containment, structural attachment). The number 5 is the internal ID of the UN dataset within the geodatabase.
- `C_Associations` is a staging table included in the Asset Package, used as the input source by the ImportAssociations geoprocessing tool.
Is this understanding correct? Is there anything I'm missing about their relationship and lifecycle?
2. Why is `UN_5_Associations` not included in the original Asset Package?
When exporting a UN to an Asset Package, only `C_Associations` seems to be carried over — the system table is not included. Is this by design? If so, what is the architectural reasoning behind it?
3. Why does ERROR 160874 occur on re-deploy?
My hypothesis is that during the first deploy, associations are written into `UN_5_Associations` automatically as part of the apply asset package process. When re-deploying, ImportAssociations reads from `C_Associations` and tries to insert the same FROMGLOBALID/TOGLOBALID pairs again — finding duplicates already in the system table and throwing ERROR 160874. Is this correct?
What is the recommended approach to handle this UN → edit AP → re-deploy cycle without running into this error?
Current workaround
I've written a Python (arcpy) script that, before re-deploying, removes from `UN_5_Associations` all FROMGLOBALID/TOGLOBALID pairs already present in `C_Associations`. It works, but I'm wondering whether there is an official or Esri-recommended way to handle this scenario cleanly.
Thanks in advance to anyone who can shed some light on this!
Mariano