Table Joins
Included in this tutorial:
Preparing a table join and checking field data types
Three options for executing a table join
Option 1: through the interface. Initiating, validating, and executing the join. Exporting the results of a table join to a new feature class.
Option 2: Using the Add Join tool
Option 3: Using the Join Field tool
Software version in examples: ArcGIS Pro 2.8.1
Tutorial Data: The tutorial includes demonstration with sample data available here.
Credits: L. Meisterlin with Thiago Lee and Moses Levich (2021)
Table joins append information in one table to another based on shared values in a common field. This tutorial demonstrates several ways to perform a table join in ArcGIS Pro.
In this example, we will join a geodatabase table to the attribute table of a point feature class based on the common values in the two tables. We will demonstrate three different ways of joining fields to a table.
Preparation
Add both the target feature class and the join table to a map project. The “target” is the table that receives the appended fields. The “join table” includes the fields that will be added to the target’s table. This example uses Points1 as the target feature class and Table1 as the join table. (Both of these are included in the tutorial standard data package.)
To execute a table join, the relevant common fields in the target layer and join table must have the same data type (e.g., long integers or text). To verify the data type of both join fields, in the respective attribute table of each dataset, right-click on a field header and click on Fields.
You can also access the Fields view by highlighting the target layer and accessing the Feature Layer Data tab (in the Main Menu ribbon) and selecting Fields. Or you can right-click on the layer’s name in the Contents panel and click through Design > Fields.
In this example, ObjectID (data type of OID field in target layer’s attribute table) is a numeric type and can be joined to other numbers. PointID (field in the geodatabase table) is a long integer.
verifying field data types within an attribute table
If necessary, we can create a new field with the desired data type in the attribute table, using the Calculate Field tool to copy the values from the original field to a new one of the appropriate data type.
Option 1: Table Join through the ArcGIS Pro Interface
Initiating the join
To initiate a table join through the ArcGIS Pro interface, right-click on the target layer name (Points1, in this example) in the Contents Panel and click through Joins and Relates > Add Join.
Initiating the join on the target layer will automatically specify that layer as the Input Layer within the Add Join dialogue box.
Next, choose the field from the target layer to serve as the basis for the table join. In our example, the OID field is the first in the attribute table and therefore is already selected.
Specify the join table (Table1). Beneath that, choose the field from the join table with values shared in the target layer from the Input Join Field dropdown menu.
The Keep all target features option maintains all records from the target layer including those that don’t have a match in the join table (they will contain null values). Unselecting it will maintain only the records that have a match in the join table. Unmatched records are hidden from view (they are not removed from the underlying dataset). This is helpful when you are joining data of only a subset of features. In the demonstration below, we leave Keep all target features selected.
Make sure that the correct table and fields are selected for the table join.
Validating and Executing the Join
Analyze the join before executing it by clicking Validate Join. This will check your data for common problems, including…
Invalid characters in field names, which can be removed in Excel or another data table software.
Mismatched records, which could indicate issues with the data, such as a many-to-one relationship in some cases.
EXTRA: Access Esri’s tutorial here for more information on possible issues during join validation.
Execute the table join by clicking OK in the Add Join dialogue box.
validating and performing the join
The Results of a Table Join
To confirm the results of the join, check that the information from the join table (Table1) is visible in the attribute table of the target layer (Points1).
confirming the results of a table join
After a table join added within a map project, the modifications in the target layer are not permanently associated with that layer. Rather, they are temporary and specific to the current map project. That is often advantageous–you might not always need to permanently append the joined fields to the target layer’s table. If not, however, you will need to export the target layer (with the newly joined data) to a new feature class to maintain the results of the join.
Export joined data to a new feature class
To create a new feature class from a target layer with a joined table, right-click on the layer name in the Contents panel and click through Data > Export Features.
Name your file and specify where to store it (geodatabase or folder).
exporting the target layer with the joined data to a new feature class
Option 2: Using the Add Join tool
Table joins can also be performed with the Add Join geoprocessing tool. The Add Join tool can be accessed in the Geoprocessing Toolboxes pane. Go to Analysis > Tools > Data Management Tools > Joins and Relates > Add Join. (You can also search within the Geoprocessing pane.)
The Add Join dialogue is identical whether accessed through the toolbox or through the interface (as demonstrated above in Option 1).
You can also perform a table join through the Add Join tool in the Geoprocessing Toolboxes pane.
Option 3: Using the Join Field tool
Unlike the other options, the Join Field tool can be used to specify individual fields from the join table to append permanently to the target table.
Access the Join Field tool in the Geoprocessing Toolbox through Analysis > Tools > Data Management Tools > Joins and Relates > Join Field. (Again, you can also find the tool by searching within the Geoprocessing pane.)
The Input Table, Input Join Field, Join Table, and Join Table Field parameters are identical to the options above.
In addition, select individual fields (one or many) to append in the Transfer Fields dropdown menu. In the example below, we click the Add Many button and select four fields to join to the target layer.
You can append individual fields permanently with Join Fields tool.