Related record data loading strategies?

165
11
Jump to solution
05-12-2020 01:46 PM
Labels (3)
Highlighted
Occasional Contributor

Does anyone have any best practice strategies for loading existing related tables (e.g. hydrant inspections, valve inspections) to the utility network schema? We have existing GlobalID-based relationship classes.

Any ideas would be appreciated.

EDIT:

With regards to Esri's Data Loading Tools... the tools include mapping of tables but maintaining related records is not mentioned in the documentation. Is it possible to migrate related tables using the Data Loading Tools?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor

Matt,

  I'm gonna have to go dark for the rest of the day, but I'm wondering if there is something up with your asset package (potentially an older version of the model?).  Check out my screenshots from earlier in the morning and you'll see that the "globalid" field in the target asset packaqge should be a guid data type and not a globalid data type, this is what allows the data loading workspace to bring your source globalid into the asset package.  in your asset package your globalid field is a globalid data type, which means the data loading workspace cannot populate it.  I would recommend you download and use the latest Esri Asset Package ( Water Distribution Utility Network Foundation | ArcGIS Solutions for Water ), as the asset package included in the sample data loading workspace appears to be using an older model that doesn't allow for carrying over globalids.

Note: there may be some adjustments you need to make to your data loading workspace if there are some model changes between releases.  I did have to make a few changes, but I believe all of mine were related to source data issues.

Once you have global ids coming across, then getting your related records over should be (relatively) simple.  As simple as anything that involves GIS and python can be expected to be.

View solution in original post

11 Replies
Highlighted
Occasional Contributor

Matt,

 If the relationship is created on a GlobalID or user generated key then the process is very simple because the primary/foreign keys will be maintained through the conversion.  If you're looking to convert relationships (or attachments) which use object id relationships, you'll likely want to add globalids to your source data ahead of the conversion (maybe even now?) and use a python script to map your old object ids to their global ids, then when you recreate the relationships just use the global ids instead.  You'll likely want to do this anyways since globalid relationships will allow you to take your data offline.

Reply
0 Kudos
Highlighted
Occasional Contributor

Ok, I'm working with the Water Distribution Utility Network Foundation (WDUNF) asset package. I am attempting to load a subset of my data into a file geodatabase with the applied WDUNF schema using Esri's Data Loading Tools. In my data mapping Excel workbook for my hydrants, I mapped the TargetField GLOBALID to the global ID field of my hydrants. Excel screenshotThen I ran the Execute Data Load tool. The GLOBALID field in the target dataset does not match the global ID of the source hydrants.

I agree, it should be simple, however, I am not finding that to be the case. Could you provide an explanation of your process?

Reply
0 Kudos
Highlighted
Esri Regular Contributor

If you add a guid field to your hydrants and calc the globalids to it, then use that guid field to map to globalid, does that work?

Reply
0 Kudos
Highlighted
Occasional Contributor

No, that did not work.

Reply
0 Kudos
Highlighted
Occasional Contributor

Matt,

  Can you show us the field data types for your source table as well as sample values for a single row for the globalid and globalid_1 columns?

Reply
0 Kudos
Highlighted
Occasional Contributor

Reply
0 Kudos
Highlighted
Occasional Contributor

Matt,

  For kicks try making the field mapping all uppercase ( !GLOBALID_1! ), then try running it through and show us what comes across in the "GLOBALID" field of the converted feature.

Reply
0 Kudos
Highlighted
Occasional Contributor

Nope. Did not work.

Reply
0 Kudos
Highlighted
Occasional Contributor

Matt,

  I'm gonna have to go dark for the rest of the day, but I'm wondering if there is something up with your asset package (potentially an older version of the model?).  Check out my screenshots from earlier in the morning and you'll see that the "globalid" field in the target asset packaqge should be a guid data type and not a globalid data type, this is what allows the data loading workspace to bring your source globalid into the asset package.  in your asset package your globalid field is a globalid data type, which means the data loading workspace cannot populate it.  I would recommend you download and use the latest Esri Asset Package ( Water Distribution Utility Network Foundation | ArcGIS Solutions for Water ), as the asset package included in the sample data loading workspace appears to be using an older model that doesn't allow for carrying over globalids.

Note: there may be some adjustments you need to make to your data loading workspace if there are some model changes between releases.  I did have to make a few changes, but I believe all of mine were related to source data issues.

Once you have global ids coming across, then getting your related records over should be (relatively) simple.  As simple as anything that involves GIS and python can be expected to be.

View solution in original post