When Spatially Enabled Dataframes are Published to Feature Layers Can We Specifiy the Format?

314
1
04-28-2020 01:45 PM
Labels (1)
KevinMWright13
Occasional Contributor

I am using the following code to export the results of my spatial dataframe to a new feature layer:

lyr = sdfToPublish.spatial.to_featurelayer('Analysis_Export', folder='Export Folder')
lyr

This runs beautifully, however it first coverts it to a .shp then publishes that as a service.   The problem there is that .shp limit the field lengths to 10 characters, thus truncating our thoughtfully designed (a.k.a. very long) field names.  Is there a way to specify another type that does not truncate the length.

Thanks!

REF: arcgis.features module — arcgis 1.8.0 documentation 

Kevin Wright
Data Visualization Enthusiast
0 Kudos
1 Reply
KevinMWright13
Occasional Contributor

I figured this out with some help from Brady Hoak of Esri.  If you want to create services based on geodatabase then you must use an Advanced notebook since it contains arcPy and the basic version does not.  This will then export your sedf's to geodatabases before publishing and will therfore retain your longer field names.  Hope this helps someone else.

Thanks!

Kevin Wright
Data Visualization Enthusiast
0 Kudos