I have two shapefiles both containing the same attributes. However, when I merge them, instead of adding the fields vertically, it's adding the fields from one shapefile to another. Resulting in empty columns, is this happening because my field names are different as I'm joining them with CSVs?
1 Answer
The problem your facing is the subject of datacleaning. If you have two datasets with the same attributes with different spellings/names/type(string or numeric ea), using tools as merge or append will regard the attributes as different/unique or throw an error (in case of non matching data types). So before merging or appending datasets/tables, you will always have to make sure the type and name of matching attributes are the same.
In ArcGIS Pro, you can use the Field Map option within the Merge tool. You can delete all output fields that you don't want to keep. Then you can select each output field. When selecting an output field, source will show you all datasets that have a matching attribute field name. You will then have to add all datasources for which you need to map the attribute with the wrong field name to the selected Output field name (this will hopefully make sense when you try it). You will have to do this for all the output fields you want to keep. If you perform a merge on all layers in one step, you will have the least amount of work when using the Field Map option (compared to doing the merges in multiple steps). Otherwise you will have to go through the output fields multiple times.
Alternatively you can easily rename columns/field names in QGIS before bringing the shapefiles into ArcGIS. Or if the problem is with the column names in the CSV files, just use any text editor to change the column names.
Regarding the use of merge or append in ArcGIS Pro: The Merge tool and Append tool in ArcGIS can combine data from different datasets in the same way, depending on how you setup the tools. The most important difference between them (to me at least) is that Merge will write the result to a new dataset, while Append will add the data to an existing or target dataset. For these types of operations I like the use of the Merge tool as it is often safer as with Merge you leave the original datasets intact. If you use Merge (in the ModelBuilder) in a series of operations, you can use Append following a merge without changing your input data.
Use the Append tool to combine input datasets with an existing dataset.