I thought I had a working ETL script going that was writing a CSV from a non-spatial Oracle DB to ArcGIS gdb when one day it broke. I whittled it down to the MakeXYEventLayer process. Basically I have a field from the CSV that has a bunch of null values and some numerical values. Depending on how the tool reads the CSV, if it sees a null value first it sets the field as text. If it sees a number in that row it'll set it as integer.
-Would a sort on the CSV work to help solve this issue?
-Or is there anyway to force the MakeXYEventLayer results into an already existing shapefile with field set to integer?
-
1I would create a table from the csv, populate the null values to zero ...as part of the ETL process. Make it more robust.klewis– klewis2016年02月11日 22:02:09 +00:00Commented Feb 11, 2016 at 22:02
1 Answer 1
Try creating a schema.ini file for your csv, such as the example posted in this answer to Cannot convert string to int using ArcPy Calculate Field?.