Select to view content in your preferred language

Editing the Utility Network Schema for an Existing Dataset

1427
2
12-15-2023 09:42 AM
Ariggs
by
Occasional Contributor

This workflow was created via dozens of documentation pages about Asset Packages and Deploying a New Utility Network, the ArcSolutions workflow for the creation of a new UN, various other unresolved Community posts put together as puzzle pieces, and a lot of trial and error. I haven't seen a definitive way to do this posted anywhere, so here it is-- my successful workflow for editing the schema of an existing Utility Network with data. I especially found the online explanations for using the D_Configurations table confusing, so I hope this helps anyone else with the same issue. This workflow assumes you are working in an Enterprise Geodatabase and that you only want one configuration category. 

Had to publish in the Questions forum, presumably the documents one is only for official Esri stuff.

 

1. Sign in as portal utility network owner in Enterprise.

2. Run [Export Asset Package] on data. No updates should now be made to current database. Include data in the export.
a. Do NOT rename the export after tool is run. During tool parameter setting is only opportunity to rename.
b. Working with a copy of the Exported Asset Package has resulted in errors during the Apply Asset Package step. It tends to get corrupted. If restart is needed, a fresh export is best.

3. Make sure that current database is backed up before proceeding further.

4. Connect to package in new project via file connection.

5. Use [Create Enterprise Geodatabase] tool to create a new database.

6. Use [Create Database User] to create a new role. This will be the new data owner, but do NOT specify a role in the tool. It auto-assigns as the data owner.

7. Create new database connection to the empty enterprise database using the credentials just created.
a. Don't forget to update OneNote with new database name and credentials.

8. Run [Stage Utility Network] with the exported Asset Package.

9. Close Pro and open it again. This is necessary between [Stage Utility Network] and [Apply Asset Package].

10. Run [Create Asset Package Configuration Table] to create the Config table for the new Schema.
a. Utility Network Package_Asset Package Reference.pdf (arcgis.com)

b. Need to create the configuration field. Domain and values already exist, just need to be assigned to new field.
c. Name the field 'Category_'
d. Do not name it 'Category_off' unless you wish to experiment with table configuration. This workflow will use the "checked on" method rather than "checked off", which refers to parameters set in [Apply Asset package] in later steps.
e. This workflow only uses one configuration category.

11. To use the table:
a. Change domain code for anything you wish to remove to "4: Always Remove When Applied". Leave everything else as is, do not change from default value.
b. For this table and the rename table created in step 12, the easiest way to make edits is to Select Attributes by record type (e.g., Fields, Domain Values, Asset Groups, Network Categories).
c. It is not possible to select all record types by asset type (e.g., Electric Device, Electric Assembly…)

12. Run [Create Asset Package Rename Table] to create the renaming table for the new Schema.
a. Create new field named "Rename_"
b. This table can rename everything except fields. Fields can only have their default alias renamed.
c. All that is needed to rename a record is to put the new name in the Rename_ field for that record. All others can be left blank.

13. These tables can be copy/pasted into another un-applied Asset Package once filled out, if necessary. This saves a LOT of time if you have to restart after filling out the tables.

14. Run [Apply Asset Package]
a. Check 'Category_' ON, do not leave unchecked. This option is after you specify the D_Configurations table to the tool.
b. Make sure D_Rename is also specified to the tool.
c. This tool is also where the name for the new Utility Network is defined.
d. CHECK the 'load data' box.
e. CHECK 'Calculate Spatial Index and Analyze' box.
i. If this box is unavailable and instead you see a box for 'Post Process', you have done something wrong. The tool will fail. Restart the workflow and copy the D_Configurations and D_Rename tables into your new Asset package after Step 8 (Stage Utility Network).

15. Check to make sure the two configuration tables applied properly.

16. If there are any adjustments to be made to Attribute Rules, now is the easiest time to do so.

17. Set the database version type to Branch. Can use the tool [Update Geodatabase Connection Properties to Branch] or can do it through the Catalog.

18. Run [Register as Versioned] tool to register the classes as Branch versioned.

19. Run [Enable Replica Tracking] on each table in the Utility Network. Do it on the UN layer first. This enables offline functionality later.

20. If there is anything that must be done before the first time the Network Topology is enabled, now is the time to do so.

21. Run the [Enable Network Topology] tool.

22. Test to verify that everything works as desired.

2 Replies
Andy_Morgan
Regular Contributor

First of all thank you so much for summarizing these steps and offering pointers for us newbies. I've been researching this topic and slowly preparing to migrate our water and sewer utilities from Geometric to Utility Network. I have a lot of work ahead over the next 6+ months, but at the moment I'm starting with a (virtual server) development level Enterprise/Portal environment and creating sandbox eGDB's to slowly walk through asset packages and data loading with workbooks.

If you don't mind, I have a few questions on what you posted. Maybe a follow-up question or two. These types of "lessons learned" are so valuable. The documentation is vast, ever evolving, and quite confusing at times...not to mention the dreaded feeling of encountering an obscure geoprocessing error that cannot be found anywhere online to offer a solution.

I depend on my IT GIS co-workers for applying production schema changes, and it must always be done after hours when services can be stopped, digging into my own personal time. For these and other reasons I'm really concerned that if we don't have it right with the correct sequence for any given workflow it could lead to disastrous, hair pulling, schema change sessions from deployment onward. I'm concerned about how long it may take to perform simple changes, too. With an empty Asset Package (no data) it takes a few minutes to do anything. I cannot imagine how long it might take to execute something significant with the "Load Data" option checked, considering all the data we'd push back and forth during each round of changes.

  • First of all, for context, please describe your GIS environment:
    ArcGIS Pro version?
    Enterprise version?
    Utility Network version?

 

  • When you say "a fresh export is best" you're implying every time you want to make any changes to the eGDB it's too dangerous to assume the Apply Asset Package will finish properly. What if I need to edit my own copy and then give to our IT GIS group who stores the latest FGDB copies on their server? Or as a backup in case I mess up? There could be many reasons, but the point is that the renaming of the FGDB is a bad idea or is any copy of the original export (i.e. same file name but different folder) possibly going to get corrupted?

 

  • Stage Utility Network vs Create Utility Network: I found with Pro 2.9 and v5 UN that it seems to work fine to use Create Utility Network tool, then apply the package to create the initial domain network objects.

 

  • The D_Configuration table is starting to make a little more sense so far. As for the Configuration category domain values, you mention the "4: Always remove when applied" option. I'm held back to an older version of Pro and therefore untools package, so I don't have those new Configuration domain values. Not sure how this impacts all your steps.

 

  • Generally speaking, will your recommended workflow cover any "normal" schema changes such as adding, removing, renaming, or changing the data type of feature class fields; removing or updating a subtype; and adding/updating/removing an asset type in the domain? When, if ever, must we go to these great lengths in the link below to completely delete the entire eGDB and re-create (with the help of DBAs)? This is absolutely terrible if such steps are truly needed from time to time. 
    How to apply revised asset package to the same utility network

I don't know who has it right between everything I'm reading. So many scenarios and opinions. Surely many other people feel equally concerned about understanding the sequence of steps and getting off on the right foot from day 1 of production deployment. 

Thanks again.

0 Kudos
Ariggs
by
Occasional Contributor

Hi Andy! I'd be happy to help answer some questions-- first off, sorry for not providing my deployment details!

1. At the time of this workflow, I was in Pro 3.1, Enterprise 11.1, and Utility Network version 6.

2. In terms of Apply Asset Package, I found that it failed invariably if I had changed the name of the Export, but only sometimes if I was using a copy rather than the original. I have the advantage (and dubious privilege) in this case of being on a very small team and having the entire process in my hands and on my machine. It seems like your circumstances necessitate using copies and backups, in which case the potential for failure does increase. My solution to having to do the entire process start to finish every time is: try not to change the schema too often. I consider the results of this workflow to be a bit of a commitment and let potential changes build up before compiling and enacting them. I will also say that I haven't identified more than one or two minor things I would like to have removed or renamed since performing this workflow nearly six months ago.

3. Being restricted to the older domain values for the D_Configurations table, I believe your options are 0: Ignored, 1: Evaluated, and 2: Exclusive? In the case of not being able to access 4:Always remove when applied, I would swap in 1 and leave the Category UNchecked rather than checked when running the Apply Asset Package tool. In step 14 I recommend that it is checked ON only because that is what works with domain 4-- unchecked and domain 1 is the same result in a D_Configurations table with one Category.

4. For this last point, I'll point you towards the chart at the bottom of this documentation page that I've referred to often for what can be added, changed, and removed without too much trouble:

https://pro.arcgis.com/en/pro-app/latest/help/data/utility-network/network-topology-actions.htm

In general, adding things to the utility network is much easier than removing them. Editing existing elements is on a case by case basis of ease, whether you need to be in the Default version, be signed in as the data owner, disable the topology, turn off feature services, etc. Consider the names you give to your subtypes, feature classes, and everything else in your initial staging steps to be a commitment. Removal and Renaming of existing elements after the initial deployment when there is data involved will generally necessitate the above workflow. All that is to say, I wouldn't consider schema changes to be "normal". Planning out what your organization wants your deployment to look like and any subsequent changes to the schema should be methodical to prevent oversights and infrequent to prevent frustration. My organization entertains schema changes after each enterprise update, for reference. 

I hope I was able to provide a bit of clarity! Good luck with your first deployment, and I'm happy to answer any other questions if I can.