I am working on a Python script that receives a nightly tab delimited flat file. This flat file has Latitude and Longitude fields and the script loads the data using the gp tools Make XY Event Layer and Append management. The flat files sometime have missing Lat/Long values and when this occurs the script still successfully loads the feature class with the records even though they are missing Lat/Long.
The problem occurs if every record on the flat file is missing Lat/Long data. So it seems that as long as one record on the flat file has Lat/Long, the code works and loads the other records to the feature class as well.
Since receiving a flat file where all records have blank Lat/Long data is a realistic scenario, is there a different gp tool/approach that will allow me to load a full file of records to the existing feature class when all records are missing Lat/Long data?
try-except
-statement? And then add proper handling in theexcept
part of course.