Newbie: Appending data to related table

1024
4
Jump to solution
06-17-2018 05:33 AM
Axelvon_Matern
New Contributor III

Hi!

Could anyone give me a hint on how to solve this problem? I just cand get my head around it.

I have a database with buildings. And a Standalone Table. Now I need to break out some of the data and add this to the related Standalone table.

Now I am trying to do this and retain the relationship? 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ChrisDonohue__GISP
MVP Alum

If you have a way of sorting down the buildings data to just that part that needs to be transferred to your standalone table, you can save this selection out as a separate dataset and then use a process to combine it with the standalone table. There are two common options available (besides many others not mentioned here):

1.  Merge (Data Management) - takes two files and combines them to make a new file

http://pro.arcgis.com/en/pro-app/tool-reference/data-management/merge.htm

2. Append (Data Management) - adds one file to an existing file.

http://pro.arcgis.com/en/pro-app/tool-reference/data-management/append.htm

Note - this does change the existing target (destination) file, so make a backup of the target destination file first just in case it doesn't work out as expected and you need to try it again.

Also note - the tricky part of both of these processes will be the Field Mapping, i.e. setting the options so the fields from one dataset are correctly matched to the other dataset.  For example, a field might be "GISACRES" in one table that needs to be added to the "ACRES" field in the second table, so the field mapping will need to be set to make this happen.

http://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/basics/field-map.htm

Chris Donohue, GISP

View solution in original post

4 Replies
ChrisDonohue__GISP
MVP Alum

I'm not super-familiar with ArcGIS Pro yet, but I do believe it offers the same functionality in this regard as ArcGIS Desktop, so take the following with a grain of salt in case that turns out not to be true.

Typically, one can do a Join to combine the spatial data table with the tabular data table.  Part of the challenge then will be determining the relationship.  Is it one to one, one to many, many to one, or many to many?  Another part of the challenge will be finding a common bit of information to allow the Join to do the matching (a primary key).  For example, is there a unique ID value in each table, like a customer ID, that can be used to link the data?

In terms of how one does this with the actual software, at least in ArcGIS Desktop it is done by either using a geoprocessing tool, or by loading the table and spatial data into a document (mxd) and then opening the properties of the spatial layer and going to the Join Tab, then filling in the information.  However, I don't know if it works the same in ArcGIS Pro.

http://pro.arcgis.com/en/pro-app/help/data/tables/joins-and-relates.htm

http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/about-joining-and-relating-tables.htm

http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/essentials-of-joining-tables.htm

.Anyways, I hope this steers you the right way,

Chris Donohue, GISP

Axelvon_Matern
New Contributor III

Hi! Thanks alot for the pointers! Very helpfull links you gave me there! I have suceeded to make a related table and I think I kind of understand the concept on relationship, keys etc. But still need to figure out how to populate it with data from the main table. Need to play around with this a few days I guess.

0 Kudos
ChrisDonohue__GISP
MVP Alum

If you have a way of sorting down the buildings data to just that part that needs to be transferred to your standalone table, you can save this selection out as a separate dataset and then use a process to combine it with the standalone table. There are two common options available (besides many others not mentioned here):

1.  Merge (Data Management) - takes two files and combines them to make a new file

http://pro.arcgis.com/en/pro-app/tool-reference/data-management/merge.htm

2. Append (Data Management) - adds one file to an existing file.

http://pro.arcgis.com/en/pro-app/tool-reference/data-management/append.htm

Note - this does change the existing target (destination) file, so make a backup of the target destination file first just in case it doesn't work out as expected and you need to try it again.

Also note - the tricky part of both of these processes will be the Field Mapping, i.e. setting the options so the fields from one dataset are correctly matched to the other dataset.  For example, a field might be "GISACRES" in one table that needs to be added to the "ACRES" field in the second table, so the field mapping will need to be set to make this happen.

http://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/basics/field-map.htm

Chris Donohue, GISP

Axelvon_Matern
New Contributor III

Thanks alot! That makes sense! Append was new to me. 

1. Breaking out the data to a standalone table

2. Creating a relationship with ObjectID as a key

Now, if I would like to change the key to a GlobalID? That would be better then using the Object ID I guess? Whats the most clever way to do this? Is this the way to do it:

3. Creating a GUID field in the related table.

4. Joining the table with the Object ID

5. Copying the GlobalID into the related table GUID field.

6. Making a new relation with GlobalID+GUID as keys

0 Kudos