We're appending a bunch of information from somebody else's database into ours. Much of it is text information, and the origin database doesn't appear to have much limit on the length of those strings. Ours was set up largely with default limits of 50 on the text fields.
So naturally it will sometimes fail to import, throwing an error like:
ExecuteError: ERROR 001156: Failed on input OID 69838, could not write value 'James Island - Subdivision not indicated, no marker' to output field SUBDIVISION
Failed to execute (Append).
SUBDIVISION
can take 50 characters, and ArcPy just tried to push 51 characters, and so it failed and crashed.
Short of increasing the length of all our database's text fields (which seems like it's going to work great until I encounter the next super-long string that exceeds the newly expanded limit), is there an elegant way to handle such cases and still get the data to append? In other words, is there a way to tell the Append function I'd like it to just truncate strings that don't fit (ideally while throwing a message letting me know that happened)?