3

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?

1
  • 1
    I would create a table from the csv, populate the null values to zero ...as part of the ETL process. Make it more robust.
    – klewis
    Commented Feb 11, 2016 at 22:02

1 Answer 1

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?.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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