In Arc 10.2 I have a script tool that uses arcpy.Append_management() to transfer .csv data into a freshly truncated feature class table. It works perfectly on all .csv tables except one in which it fails on just two particular columns. Instead of seeing data these columns are "Null" all the way down.
The names of these columns are "Type" and "Subtype", and both are "Text" fields.
"Type" should have values such as:
"Human-Land" and "Human-Marine"
"SubType" should have values like:
"Sub-Surface Flow" and "Water Course"
Rather than supply code (for now) I'm going to zero in on a peculiarity I found in the field mapping variable.
I acquired the field mapping by running "FeatureClasstoFeatureClass", and here is what it gave me for these two fields:
...;Type_ "Type_" true true false 255 Text 0 0 ,First,#,Temp_Layer,Type_,-1,-1;SubType_ "SubType_" true true false 255 Text 0 0 ,First,#,Temp_Layer,SubType_,-1,-1;...
Why did it add an underscore "_" to the end of the field name? None of the other field names have underscores added to them. I tried using the field mapping as Arc gave it to me, and I've also tried it with those underscores deleted. Both ways I still get those two fields filled in as "" all the way down.
Is this related to the problem? If so, why is this happening and what is the fix?