I would like to keep all records when joining fields in ArcMap. I know that I could do this by adding a join, but I would like to use the Join Field tool so that I can dictate which fields are joined and so that it does not change the field name when joined. Is there a way to keep unmatched records when using the Join Field tool?
-
After JoinField, can you select the unmatched records and append the input Table?– klewisNov 17, 2016 at 19:52
2 Answers
Using python, you could setup your code to specify the input tables and fields, in addition you could specify keep all fields. Here is the syntax table to refer to that uses the join field tool, that I found here or here and a detailed explanation on a another use by GIS SE user Polygeo here
or if you wanted to you can modify your code using the add join field as here
Here is the standard approach using the join data tool in ArcMap:
Once you have selected your files and fields to base your join on, you can keep all records by keeping the default radio button on "keep all records".
Esri, provide an overview on the essentials of joining a table here.
You can see the option here to keep all records, the features that joined and not. You will have null values in the fields with no corresponding match.
-
Although this works, OP wants to use the "join field" tool specifically to specify the fields. An additional work around would be to rename their fields using python to speed up the process or remove the irrelevant fields prior to joining.– GISHumanNov 17, 2016 at 18:07
-
Yeah, I specifically wanted to use the "Join Field" tool so as to reduce the amount of modification I would have to do with the table in regards to removing irrelevant fields and naming issues. I'm working with it in a script, but just wanted to throw this question out there before changing a bunch of the code.– mmooreNov 17, 2016 at 18:13
-
I'll update my answer to include that portion to assist with your code.– whyzarNov 17, 2016 at 18:21
-
I get how to perform both methods of joins, but am specifically wondering if anyone knows of a way to keep all records, even unmatched ones, using the Join Field tool.– mmooreNov 17, 2016 at 18:34
-
Have you tried running the script and checking to see if the default is to keep all records, even unmatched ones? I want to believe that is the default when not specifying the filed name.– whyzarNov 17, 2016 at 20:14
Say you have 100 records in a table A, and 100 in another table B. If you want to join table A to B, but not all 100 will match to table A, you can select keep all records. Table A will be joined to Table B, the values that do not match values in Table B will be