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?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Feb 11, 2016 at 20:22
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. 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?.

answered Feb 12, 2016 at 6:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.