How to load features + attachments from FGDB to existing SDE GDB

7954
8
Jump to solution
05-07-2014 08:07 AM
MikeSchonlau
Occasional Contributor III
I've got an existing feature class with attachments enabled in SDE. I have a file geodatabase with new features and their related attachments that I want to load into SDE. What is the best practice for loading these new features and attachments into an existing feature class? The data loader only takes the point features. The Add Attachments tool requires the attachments to be in a folder as individual files. Any ideas?
1 Solution

Accepted Solutions
MikeSchonlau
Occasional Contributor III
Thanks for your feedback, but this workflow does not work for me. By default, the gdb attachments table uses a REL_OBJECTID field to link its features. When the features are copied and pasted or loaded with the data loader into the SDE feature class, the ObjectID's are overwritten. This severs the linkage between the new features and the FGBDB attachments table.

I solved my problem with the following steps:

  1. Copied and pasted new FGDB features to SDE feature class

  2. Added field to FGDB feature class called "NEW_OBJECTID"

  3. Joined SDE feature class to FGDB feature class using a different common field ("Outfall_ID")

  4. Field calculated NEWOBJECTID attribute with OBJECTID from SDE feature class

  5. Added field to FGDB Attachments table called "NEW_OBJECTID"

  6. Joined FGDB feature class to FGDB attachments table using OBJECTID-to-REL_OBJECTID

  7. Field calculated NEW_OBJECTID attribute in FGDB attachments table using NEW_OBJECTID from FGDB feature class

  8. Used data loader to load FGDB attachments table into SDE attachments table specifying REL_OBJECTID as the target and NEW_OBJECTID as the matching field


View solution in original post

0 Kudos
8 Replies
NidhinKarthikeyan
Occasional Contributor III
Copy and Paste the features from File Geodatabse to ArcSDE Geodatabase (Make sure the Geometry and Schema is same). The issue with Copy/Paste feature option is that, the old row will be retained and the new rows will be created in attribute table, once you Paste the feature. The attribures wont be overwritten.

If you have only few feature to update in ArcSDE, then its better to update it directly in ArcSDE Gdb.

Attachment can be added after updating the Features in ArcSDE Geodatabase.

Make sure you have complete backup of the database before you try this.
0 Kudos
MikeSchonlau
Occasional Contributor III
Thanks for your feedback, but this workflow does not work for me. By default, the gdb attachments table uses a REL_OBJECTID field to link its features. When the features are copied and pasted or loaded with the data loader into the SDE feature class, the ObjectID's are overwritten. This severs the linkage between the new features and the FGBDB attachments table.

I solved my problem with the following steps:

  1. Copied and pasted new FGDB features to SDE feature class

  2. Added field to FGDB feature class called "NEW_OBJECTID"

  3. Joined SDE feature class to FGDB feature class using a different common field ("Outfall_ID")

  4. Field calculated NEWOBJECTID attribute with OBJECTID from SDE feature class

  5. Added field to FGDB Attachments table called "NEW_OBJECTID"

  6. Joined FGDB feature class to FGDB attachments table using OBJECTID-to-REL_OBJECTID

  7. Field calculated NEW_OBJECTID attribute in FGDB attachments table using NEW_OBJECTID from FGDB feature class

  8. Used data loader to load FGDB attachments table into SDE attachments table specifying REL_OBJECTID as the target and NEW_OBJECTID as the matching field


0 Kudos
ShannonPugh
Occasional Contributor

That is just an awesome solution! Though it seems that there should be an easier way, your solution works like a charm. Thanks, I've been fretting over this one.

0 Kudos
JamesFieman
New Contributor

I recently tried this method, and it seemed to work after the first step!

Thanks Mike

JenniferCasey1
New Contributor III

I was able to use the Append(Data Management) tool.  It brought over the the feature and kept the relationship with REL_OBJECTID intact.  

0 Kudos
ShannonPugh
Occasional Contributor

Really? Which version of ArcGIS Desktop are you using?

0 Kudos
JenniferCasey1
New Contributor III

I am using 10.5.1 and there are no duplicate Global IDs between my FGDB and SDE.  

ShannonPugh
Occasional Contributor

Append worked well in ArcGIS Pro also.

0 Kudos