Migrating Attachments from the GN to the UN

953
3
Jump to solution
02-21-2022 04:37 PM
by Anonymous User
Not applicable

I am trying to migrate data from the Geometric Network to the Utility Network using the Esri data loading tools.  I'm currently stumped with the best way to migrate attachments.

The original attachment relationship class users a objectID /rel_object ID relationship class.

RandallChew_0-1645489954737.png

The target UN model uses a globalID / rel_globalID method.  

RandallChew_1-1645490046841.png

I realize this will most likely need to be a separate post (or pre) processing step but I just can't get my head around it.  If post I need to somehow get the global ID to propagate out between the feature class and the table but since that global ID will be new upon load that makes it more difficult.  I also don't want to use the append method as I need the flexibility of the data loading tools

Any advice would be greatly appreciated.

0 Kudos
1 Solution

Accepted Solutions
MikeMillerGIS
Esri Frequent Contributor

Have you thought about converting the source data to use GlobalIDs as the relationship key?  https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/migrate-relationship-class-t...

 

Then on append, if you set the field type to Guid instead of Global ID, it should let you preserve the global ID on import, so the source and target have the same global id.  We are looking at how to streamline this process with the Data Loading Tools.

View solution in original post

3 Replies
Terry_Iffland
New Contributor III

When you import your features into the database, you OID’s get updated/replaced. You need to preserve these values before migrating to the new database.


When I've had to maintain the relationship, on the owner table I've created two temporary attributes on the primary table (LegacyOID, RelatedLegacyOID) and did a field calculate to copy the OID to LegacyOID and RelOID to the RelatedLegacyOID. I then went to the table with related items and created temporary attributes (LegacyOID, LegacyParentOID) and used field calculate to copy OID to LegacyOID. There should be an attribute that is something like ParentOID. Use field calculate to copy ParentOID to LegacyParentOID. Now you can relate the parent to child using Parent.RelatedLegacyOID to Child.LegacyOID. You can also relate the child to the parent using Child.LegacyParentOID to Parent.LegacyOID.

After you create the relationship with these legacy values, you can use the field calculator to copy the GlobalID of the parent to the ParentOID in the child.

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

Have you thought about converting the source data to use GlobalIDs as the relationship key?  https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/migrate-relationship-class-t...

 

Then on append, if you set the field type to Guid instead of Global ID, it should let you preserve the global ID on import, so the source and target have the same global id.  We are looking at how to streamline this process with the Data Loading Tools.

by Anonymous User
Not applicable

Thanks Mike. Yes, that's what we ended up doing.  The GP Tool to migrate the relationship class in Pro worked well.  We ran that in the source first, then updated our data loading tool worksheets

0 Kudos