I am interested in doing a join of spatial data to a csv in which one geographic feature is joined to multiple values from the csv. However, the only apparent option for a join from a spatial file to a csv is a one to one, and I need to do a one to many (in the same way that this is an option for a spatial join). I know the relate function is a potential solution but I will eventually need to export the data as a shapefile so the increased entries have to be exportable. Has anyone found a workaround specific to ArcGIS Pro?
Solved! Go to Solution.
I realize this is almost a year later, but thank you to Xuan for helping me stop beating my head against the wall trying to solve this issue! The join validation (using Pro 2.8) kept stating one-to-one when I knew it should've read one-to-many. Lo and behold, I had the source and join table in separate geodatabases. Exported the source feature class into the same default.gdb created with the project and it worked perfectly. Thanks again! 👍
Worked for me too, great suggestion!
Your reply should honestly be marked as the solution. Way easier to do this. I just tried it too and it works beautifully.
Yes, this is the better solution. I couldn't join a csv to a feature class until the csv was brought into the geodatabase. After that, both Make Query Table and normal join (Create Join) worked fine, so I went with the simpler normal join.
Wow, worked! Cheers, Xuan!
Shows how important it is to keep the layers, or a copy in the same geodatabase for a smooth process.
I found an alternate solution, for anyone that might be referencing this post later. I had a table with data by month for different routes (1155 features) but no spatial or location information and route polygon areas (229 features) that I needed to join to show the attributes that vary by month for each route. Make query table created a multiplication of my 1155*229 features but did not maintain the attributes needed to display this spatially without additional processes. This was my workflow in ArcPro:
Start with the polygon and table both having a uniqueID field for joins. You may have to create a field that has a relevant uniqueID, I used a day and route number.
Export the table and polygon/ point layer in the same gdb, this will not work on an excel brought in.
Run add ‘attribute index’ tool on these fields.
Convert the polygon to a point using the’ Feature to Point’ tool and check the box for ‘inside’ in ArcPro- I am using 2.7
Run the tool called ‘calculate geometry attributes’ tool, I used WGS 84 and linear US feet and square feet for the parameters.
Note: creating fields and calculating geometry didn’t work for me when I went to display x,y date because of required field type errors.
Now you have a point file with and x and y field and a unique ID field ready to join.
The many to one join:
Select the table (the ‘many’) and add join, join to the point layer(the one) with the x,y fields. Use the UniqueID field for the join and keep all records.
Export this joined table to the gdb. (Display x,y tool will fail on a joined layer.)
Take the new table and right click to run the ‘display x,y’ tool. Check the attribute count, it should match the original table, if not check the join and fields.
Hi David,
I know this is old, but another less code-y solution is to save the CSV as a geodatabase table IN THE SAME geodatabase as the feature layer.
Join then picks up the one-to-many immediately. But as noted, the table and the layer must be in the same geodatabase. Otherwise it just does a one-to-one.
Barry