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

sdf to_featurelayer #1308

Closed hildermesmedeiros closed 2 years ago

hildermesmedeiros commented 2 years ago

Describe the bug Currently we need to convert int64 to str. That is not a issue, but the lacking of warning, error causes new users to make this mistake.

To Reproduce Steps to reproduce the behavior: image

The gis module is publishing int64 columns. But if there are ints over 32 bits it the insert fails.

Expected behavior It should warn and try to make str conversion.

Platform (please complete the following information):

achapkowski commented 2 years ago

@hildermesmedeiros this is correct. The feature class data model for shapefile and fgdb do not support int64 values for Non-OID fields. For this issue, I would suggest you contact Esri Support and log an enhancement request.

hildermesmedeiros commented 2 years ago

@achapkowski , I sincerely belive that it would be best to give warnings or give error messages. Why create a long int for int64 data - if they wont fit in there? Therefore, the enhacment would be a proper message, if what you say is limitation in the server side.

achapkowski commented 2 years ago

I can add a message. Pandas defaults to int64, so you'll get the message quite a bit. In 2.1.0 (upcoming release), when pulling data from services and feature classes not ensure all dtypes are int32 over int64.