Some time back I had a requirement to develop an automated method (Python) to update field values for a spatial points dataset in an Oracle 11g SDE database (exported to GDB for testing). Im Using Win 7, ArcGIS 10.2, Python 2.7.5.The requirement was to create a selection of duplicated records and distribute the export to other offices for recipients to mark the rows as either KEEP or RETIRE and return the extract (csv) to me.
The idea was that I could then use csv.dictreader to import the results from the 2 required columns ('book_id' and 'book_ref') in the csv, keeping only results that met the criteria = 'KEEP'.I then wanted to pass those results to my feature class with further refinement only updating the existing values where the csv file 'book_id' number matched the feature class 'book_id'.
I ended up doing the task manually as i couldnt get a result from code despite researching the ArcGIS help section, hundreds and hundreds of posts on this site, geonet, arcpy cafe etc, etc.
Eventually though I cobbled enough bits together to make it work oustide of work then thought I would post the solution in case others had similar needs.
أكثر...
The idea was that I could then use csv.dictreader to import the results from the 2 required columns ('book_id' and 'book_ref') in the csv, keeping only results that met the criteria = 'KEEP'.I then wanted to pass those results to my feature class with further refinement only updating the existing values where the csv file 'book_id' number matched the feature class 'book_id'.
I ended up doing the task manually as i couldnt get a result from code despite researching the ArcGIS help section, hundreds and hundreds of posts on this site, geonet, arcpy cafe etc, etc.
Eventually though I cobbled enough bits together to make it work oustide of work then thought I would post the solution in case others had similar needs.
أكثر...