1

I currently use arcpy.TableToTable_conversion in order to convert a CSV file into an ArcGIS file geodatabase table. This works when string length is less than or equal to 255 characters. Whenever 255 characters is exceeded the conversion fails. Is it possible to force the textfield in the table to be larger than 255 characters?

3
  • 2
    Have you tried editing the field mapping? May 27 '15 at 13:11
  • Do you have a schema.ini file in the same directory as your CSV? It might be setting the field length on you. Try moving the csv or renaming the schema file.
    – KHibma
    May 27 '15 at 13:16
  • @PolyGeo edited my question, it is a file geodatabase table but as I commented below, I Think that the solution will have to involve creating a FieldMapping object and feed that as a parameter to TableToTable_conversion.
    – Sebastian
    May 27 '15 at 13:48
2

Chad Cooper is right. change Text Field Length in Field Mapping. Make sure your length doesn't exceed your ouput workspace (FileGeodatabase, SDE, DBF) text field length limitation

enter image description here

3
  • 2
    He did say he was using arcpy scripting, not the tool dialog...
    – KHibma
    May 27 '15 at 13:41
  • Thanks, that works for manual importing. I guess I have to create a FieldMap then in arcpy and feed that FieldMap to TableToTable_conversion.
    – Sebastian
    May 27 '15 at 13:44
  • for fieldmapping check gis.stackexchange.com/questions/26392/… or ArcPy Documentation. If you have any furthure question, start a new thread and ask your qeustion. May 27 '15 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.