Esri / arcgis-python-api

Documentation and samples for ArcGIS API for Python
https://developers.arcgis.com/python/
Apache License 2.0
1.87k stars 1.1k forks source link

sedf.spatial.to_featureclass sanitize_columns parameter is a breaking change #936

Closed crackernutter closed 3 years ago

crackernutter commented 3 years ago

Is your feature request related to a problem? Please describe. I use the sedf.spatial.to_featureclass to create temporary feature classes I then append to enterprise geodatabase tables. The issue is with the most recent release that the sanitize_columns parameter defaults to true, which from my perspective constitutes a breaking change from the previous versions without that option. Appending a feature class with these sanitized column names either fails or doesn't include mismatched fields since the column names do not match (depending on whether you're using "TEST" or "NO_TEST" in arcpy.Append_managmeent).

Describe the solution you'd like Make the sanitize_columns parameter default to False

AtmaMani commented 3 years ago

@crackernutter you can switch this behavior by setting sanitize_columns=False. You can also tune how the sanitizer works using GeoAccessor.sanitize_column_names() method along with setting the sanitize_columns=False parameter when exporting.

After much discussion we decided to make this new parameter default to True, as we wanted to normalize how the data gets persisted, immaterial of the database back-end (Azure / SQLServer vs Postgres and dBASE vs fgdb etc.) used. We believe this setting would benefit most common workflows.

We also plan to normalize the columns upon read time. Thus, the column names in the SeDF will correspond to the columns in all persisted formats (table, feature layer, feature class, geopackages, feathers etc.).

Apart from the above, we cannot switch parameter defaults per the current semantic version.