I've got a workflow that appends values from a CSV file into a geodatabase table. Using field mapping, I've got the CSV column mapped to a text field. The issue I have is that the CSV column contains mixed data types, such as values with text and numeric values, and others as just numeric values.
For example (sample data from CSV):
The line in my code looks like this:
arcpy.management.Append(FS_Staff_fc, Archive_table, "NO_TEST", r'STANUM "STANUM" true true false 8 Double 0 0,First,#,FS_Staff_fc,STANUM,-1,-1;ADDRESS "ADDRESS" true true false 30 Text 0 0,First,#,S:\FS_Staff_fc,ADDRESS,0,30;CITY "CITY" true true false 30 Text 0 0,First,#,FS_Staff_fc,CITY,0,30;STATEZIP "STATEZIP" true true false 30 Text 0 0,First,#,FS_Staff_fc,STATEZIP,0,30;DIV "DIV" true true false 4 Text 0 0,First,#,FS_Staff_fc,DIV,0,4;Region "Region" true true false 10 Text 0 0,First,#,FS_Staff_fc,Region,0,10;BATTID "BATTID" true true false 4 Long 0 0,First,#,FS_Staff_fc,BATTID,-1,-1;Bureau "Bureau" true true false 10 Text 0 0,First,#,FS_Staff_fc,Bureau,0,10;Sick_Pct "% Sick" true true false 8 Double 0 0,First,#,FS_Staff_fc,Sick_Pct,-1,-1;Total_Sick "Total Sick" true true false 2 Short 0 0,First,#,FS_Staff_fc,Total_Sick,-1,-1;Total_Staffing "Total Staffing" true true false 2 Short 0 0,First,#,FS_Staff_fc,Total_Staffing,-1,-1;Sick_Query "Sick (Query)" true true false 2 Short 0 0,First,#,FS_Staff_fc,Sick_Query,-1,-1;Sick_EMS "Sick (EMS)" true true false 2 Short 0 0,First,#,FS_Staff_fc,Sick_EMS,-1,-1;Injury "Injury" true true false 2 Short 0 0,First,#,FS_Staff_fc,Injury,-1,-1;LongTerm "LongTerm" true true false 2 Short 0 0,First,#,FS_Staff_fc,LongTerm,-1,-1;SoFi "SoFi" true true false 2 Short 0 0,First,#,FS_Staff_fc,SoFi,-1,-1;Vacancy "Vacancy" true true false 2 Short 0 0,First,#,FS_Staff_fc,Vacancy,-1,-1;Shape_Length "Shape_Length" true true false 8 Double 0 0,First,#,FS_Staff_fc,Shape_Length,-1,-1;Shape_Area "Shape_Area" true true false 8 Double 0 0,First,#,FS_Staff_fc,Shape_Area,-1,-1;UID "UID" true true false 4 Long 0 0,First,#,FS_Staff_fc,UID,-1,-1;Query_Update_Date "Query Update Date" true true false 8 Date 0 0,First,#,FS_Staff_fc,Query_Update_Date,-1,-1;EMS_Update_Date "EMS Upate Date" true true false 8 Date 0 0,First,#,FS_Staff_fc,EMS_Update_Date,-1,-1', '', '')
When the values come into the new table, sometimes the value with text AND numbers come over as null values. The numerical values do persists. It's strange because it doesn't happen every time either.
Is there a sure-shot way to import the values, without the tool assuming the values are numeric only?
