Closed chris-fox closed 6 years ago
@chris-fox Fixed this and other errors that occurred after this point. Your test data was good at exposing some logic problems. Its interesting that your test data has records with the same IDs AND the same dates for each record. In this case it will just pick one of them. It looks like your "date_completed" field has more unique dates that should be used instead. I ended up using an SQL ORDER BY clause in the update cursor to just bring the most current record to the top based on date. This seems to be a good default for when a group of records with the same IDs have records with the same date (like your data) or when there is a mix of null dates and populated dates
Thanks @cosbyr, looks good. I saw the duplicate permit ids as well, need to work with the customer to understand why that scenario might occur.
Exception thrown here when geocoding addresses because loc_fields is a list of strings rather than a string. If you get past this error it throws an exception at len(dup_rows) error: object of type 'da.UpdateCursor' has no len()