Merging together Attachment Data sets

8837
13
07-13-2014 03:46 PM
EricPescatore
Occasional Contributor

... So in my attempts to navigate the ESRI, ARCGIS website to post a question... it has led me to this point... so... hopefully this would be the place to ask a simple question.... I feel lost and confused...

I have attachment data posted in ArcGIS online, but due to a misunderstanding of the MAX TABLE RETURN when publishing content, i'm limited to downloading 1000 records...... So one path i'm looking into in order to get to my data down and republish... i will need to download it in 1000 feature chunks using "Create local copy for editing". (Note that i have over 9000 points and 4 GB worth of attachment data... up in the cloud)

So now i have 8 databases, each with an attachment table, identical schema and assumed global IDs that were generated when publishing to AGO. How might one merge these attachment tables and maintain the relationship into a single MASTER dataset?

Getting the feature classes together seems is a simple enough task but i assume it can't be as easy as "loading data" into the attachment table? THere was a help doc related to restoring relationship table... but really lookin for guidance . Also i would use the Export to file geodatabase option that was recently added with the July AGO release but unfortunately, it fails due to the fact that i don' think they were expecting someone to host over 5 GB worth of attachment data

What is the easiest way to merge data together into a single attachment table and dataset?

13 Replies
V_StuartFoote
MVP Frequent Contributor

Eric,

Sorry, I can't be of much help with this, but someone from the ArcGIS Online community may be of more help. Suggest you  use the Move selection from the Actions list on the right to move this thread to the ArcGIS Online space.

Also you might add the "arcgis_online" tag.

Good luck.

Stuart

PaulStephenson
Occasional Contributor III

Eric,

Here is a method I used in the past, I don't know that it is the best method, but it worked in my case. Hopefully it will help you out or give you some ideas:

Add new text field to All Participating Feature Classes & Their Attachment Tables

Add and Calculate New Field to Equal GlobalID for Feature Classes, and REL_GlobalID for Tables

Merge Feature Classes. Merge Tables.

Add New Long Integer Field to Merged Table (Like REL_OID).

Join Merged Table to Merged Feature Class Based on Text Equivalent to GlobalID.

While Joined, Populate New Field with OID from Merged Feature Class.

Feature Class to Feature Class - Remove GlobalID in Field Map.

Enable Attachments on Merged Feature Class (Creates New Table & Relationship).

Right Click Newly Created Attachment Table and Load Data from the Merged Table.

In the Field Map, Specify the New Field Based on the Field Containing the OID Obtained from Merged Feature Class, Leave the Remainder Default.

Check Results in ArcMap.

Paul

JessicaGooch1
Occasional Contributor

Hi Paul,

I am also having the same issue as the original poster.

I seem to get confused somewhere around the step about Feature Class to Feature Class - Remove Global ID in Field Map.  Am I creating another feature class?  Or just removing the Global ID?

I created a new feature class, enabled attachments and then loaded the data from the Merged Table.  I specified the new field with the REL_OID field and left the remainder default.  When I open up ArcMap I am still not seeing the attachments...

Do you have any further guidance?

Thanks!!!

-Jessica

PaulStephenson
Occasional Contributor III

Hi Jessica,

The Feature Class to Feature Class portion was a work-around method to simply remove Global IDs. I can't remember exactly which portion, but the Global IDs were preventing one of the later steps. Did the joining merged data and field calculation portion work out all right?

Paul

JessicaGooch1
Occasional Contributor

Hi Paul,

Thanks!  Using your instructions and then a little bit of this:

41763 - Batch export attachments from a feature class

I finally managed to get it to work.  Adding a GIS_ID and removing the Global IDs is what finally got this to work for me.

I have managed to replicate the process once and I need to do it one more time, hopefully writing down the steps so I have how I got this to work documented...

again...thank you thank you thank you!!!

JessicaGooch1
Occasional Contributor

Eric,

I have managed to get this to work.  Once I document the steps, which are very similar to what Paul has suggested, I can post them for you.

-Jessica

JeremyLinley
New Contributor III

Have you had a chance to document the steps? I am needing to do this for 18 feature classes.

0 Kudos
JessicaGooch1
Occasional Contributor

Here are the instructions I came up with:

Merging Feature
Classes with Attachments

  1. For each feature class and attachment table add a new text field
    1. NewTextField
  2. Populate each “NewTextField” using the field calculator with the following:
    1. Feature Class – GlobalID
      • Field Calculator – NewTextField = GLOBALID
    2. Attachment Table – REL_GLOBALID
      • Field Calculator – NewTextField = REL_GLOBALID
  3. Check to ensure all records join
    1. Join Feature Class to Attachment Table then Validate Join
    2. The numbers of matching records should match
    3. Cancel the join
  4. Merge the feature classes together to create a new feature class
  5. Merge the tables together to create a new attachment table
  6. Add a long integer field to the merged attachment table.
    1. REL_OID
  7. Join the Attachment Table to the Feature Class using the “NewTextField”
  8. While joined, populate REL_OID with the ObjectID from the Feature Class
  9. Remove Join.
  10. Run the Feature Class to Feature Class tool on the merged Feature Class and remove the GLOBALID in the Field Map.  This needs to be done in order to relate the attachments using the OID.
  11. Create the attachment table for the merged feature class with no global ID.
  12. Load data from the merged attachment table and change the matching source field from <none> to REL_OID
  13. Check to ensure attachments are now visible in ArcMap.

Hopefully this works for you!  One thing that I am still working on is getting the merged feature classes serviced back up on to AGOL.  It seems that AGOL is not happy with the removal of the GLOBALID field...this could also be operator error

Good luck!

JeremyLinley
New Contributor III

Thank you. I have run into an issue. What happens when both tables have entries with the same REL_GlobalID? When we merge the tables and try to join with the merged feature class by the ‘NewTextField’ it will join to the wrong one since they have the same REL_GlobalID. Does this make sense?

Trista C. Hahn

GIS Specialist

1552 South 7th Street

St. Louis, Missouri 63104-3805

T. 314.881.5469

F. 314.863.5578

thahn@civildesigninc.com<mailto:thahn@civildesigninc.com>

www.civildesigninc.com<mailto:jlinley@civildesigninc.com>

0 Kudos