Is it possible to set the field length when publishing a feature layer from a spatially enabled dataframe?

644
1
08-20-2021 09:29 AM
JohnMDye
Occasional Contributor III

I'm publishing a feature layer from a spatially-enabled dataframe using the .to_featurelayer method on the GeoAccessor class. Works great, no issues there.

One of the columns in my SDF contains a comma-separated list of "amenities" for each feature. Obviously, the number of amenities varies by location. When attempting to update a record, I'd found that none of the records in my publish contained the maximum number of amenities, the field length was set to a lower length than what I might need in the future.

Is there a way to explicitly set the field length when publishing through the Python API? I've looked through the documentation and don't see an obvious way to do this but I'm hoping I've missed something. 

1 Reply
HayesBuchanan
New Contributor II

I'm having the same issue! I even update the field length through AGOL, but when the data updates the field length reverts to 255 characters.

0 Kudos