Select to view content in your preferred language

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

839
2
08-20-2021 09:29 AM
JohnMDye
Frequent Contributor

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. 

2 Replies
HayesBuchanan
Emerging Contributor

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
DBlake
by
Occasional Contributor

I know this is 3 years ago but did you find a solution? - I have the same problem...

0 Kudos