arcgis-python-api icon indicating copy to clipboard operation
arcgis-python-api copied to clipboard

sdf.spatial.to_featurelayer ‎before creates "File geodatabase" and, now, ShapeFile

Open geografiadascoisas opened this issue 1 year ago • 3 comments

Before the update in ArcGIS Pro, my ArcGIS API for Python behaved as follows:

When I used the sdf.spatial.to_featurelayer to "send" a Spatial Enabled DataFrame to ArcGIS Online, I had a FeatureLayer + File Geodatabase. Now, the same code creates a FeatureLayer + Shape file in ArcGIS Online.

With that, the names of my columns are changed, even using sanitize_columns=False, which seems to have no effect.

Publish the SpatialDataFrame as a feature layer

item = sd.spatial.to_featurelayer( title='New Error', gis = GIS, tags=['bug', 'error'], folder='new_behavior', sanitize_columns=False, service_name='newerror' )

Current version of ArcGIS API for Python: 2.1.0.3 / Python 3.11.1

geografiadascoisas avatar Dec 15 '23 21:12 geografiadascoisas

This happens when arcpy cannot be found in your environment. Try upgrading to the latest python api version as well in the environment and ensure arcpy is installed in that environment.

nanaeaubry avatar Dec 18 '23 13:12 nanaeaubry

Thanks, I hadn't found anything about this in the documentation, I apologize for reporting it as bug. However, I imagined that this function was available without the need for ArcPy.

geografiadascoisas avatar Dec 18 '23 17:12 geografiadascoisas

@geografiadascoisas It is available but creates a Shapefile in that case. FileGeodatabase is only created with the use of arcpy.

@jyaistMap Maybe we can add a note in the doc about this or into one of the SeDF guides ?

nanaeaubry avatar Dec 18 '23 17:12 nanaeaubry