Join by attribute - not joining random cells

938
5
Jump to solution
06-07-2021 02:48 AM
KK2
by
New Contributor III

I am trying to join an attribute from a *.csv table to a polygon shapefile by using: Join and Relates > Join (by attribute), where I use id attribute as an indicator to join. However, the join does not work for the entire dataset well. After correct processing of some part of data it is joining only every second polygon in my dataset and sett value null to the rest (see attachment where I hatched the polygons where the join function does not join the values to the polygons). 

My input data are fine and the id indicator exists in both datasets where the function does not want to join the value. What can still be wrong? Is there a limit to perform join? I have 300 000 polygons and the same number of cells in my csv table to join.

 

Capture.PNG

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JayantaPoddar
MVP Esteemed Contributor

I would recommend importing the CSV and shapefile to File Geodatabase, to overcome any constraint linked to shapefiles (the data size could be huge considering the number of records).

First, create a File Geodatabase table from the CSV using Table to Table (Conversion) .

Also import the shapefile to the File GDB Feature Class To Feature Class (Conversion) .

Try a Join now Add Join (Data Management) .

 



Think Location

View solution in original post

5 Replies
JayantaPoddar
MVP Esteemed Contributor

I would recommend importing the CSV and shapefile to File Geodatabase, to overcome any constraint linked to shapefiles (the data size could be huge considering the number of records).

First, create a File Geodatabase table from the CSV using Table to Table (Conversion) .

Also import the shapefile to the File GDB Feature Class To Feature Class (Conversion) .

Try a Join now Add Join (Data Management) .

 



Think Location
KK2
by
New Contributor III

Thank you for your answer. The solution proposed by you works perfectly, so I think it had an issue with the number of records in my data.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Glad it worked.

Size limitation could be a cause.

Shapefile limit = 2 GB

File Geodatabase Feature Class limit = 1 TB (can be further extended to 256 TB using configuration keyword)

Here are a few good articles that discusses the benefits of File Geodatabase over shapefiles.

The Top 9 Reasons to Use a File Geodatabase 

Geoprocessing considerations for shapefile output 

 



Think Location
JonathanMcDougall
Occasional Contributor III

Yeah, I stopped using shapefiles years ago - always better to use a feature class. I realise a shapefile can still be required elsewhere, however, for any of your won work feature classes within a filegeodb is the way to go. 

0 Kudos
JonathanMcDougall
Occasional Contributor III

Just to second @JayantaPoddar  , important this work is done within a flegeodb feature class importing the Shapefile to Feature Class and importing the CSV as a table.