Merge works different in Pro when shortening textfields via field mappings

184
1
10-11-2021 03:23 AM
Labels (1)
TheresaGaffry
New Contributor

Hi all, 

I haven't found anything about my issue so far, so I'm asking you experts 🙂

I have a python script which merges 15 shapefiles in the first step and writes them to a new feature class in a second step. In the second step the properties for some fields change such as shortening textfields from 150 to 80 characters. 

The script used to be in python for ArcMap 10.6 and ran perfectly.
When switching to ArcGIS Pro the script switched to python3.

The issue that came up now is that the second merge (arcpy.Merge_management()) leads to a different result in ArcGIS Pro than ArcMap.
When running the script in the python window in ArcGis Pro the second merge comes out empty.
When I do the merge by hand (Merge Tool) the number of records is reduced. 

The problem seems to be with the lenghts of the text in the textfields being longer than the new assigned numer of allowed characters.
Running the merge in ArcMap the text had simply been cropped (desired result), whereas when doing it by hand in Pro the number of records is reduced by the affected records. 

How can I achieve that Pro crops the text in the fields instead of deleting the rows, ideally in python3? 

I have tried Feature Class to Feature Class instead of the second merge with the same problem occurring.

0 Kudos
1 Reply
HannesZiegler
Esri Contributor

Hi TheresaGaffry,

If you are able to, it would be helpful if you could provide code for us to view, that would make it easier to help you with your question. Best would be a simplified version of the code / steps that reproduces the error you are seeing. Without any code or concrete steps, it's unclear where any potential bug or error in the process might be.

0 Kudos