wesley.king

Returning record attributes after inserting record into Oracle/SDE

Discussion created by wesley.king on Jan 17, 2014
Latest reply on Jan 26, 2014 by wesley.king
Python Noob here, but I'm trying to write a script that will insert records from a shapefile into our Oracle/SDE database.  Here's the issue...We have an Oracle trigger that creates a unique ID as soon as a record is inserted.  For reasons I won't go into, I need to know the unique ID as soon as the record is created.  I don't want to trust my script returning the unique ID of the last record inserted because that wouldn't be safe, or good scripting in my opinion.  I also could use a temporary field to hold a unique value in the shapefile records and then join them, but I figure there's got to be a better way.

If I'm using an insert cursor to iterate through the records in the shapefile and inserting them into the SDE feature class, is there a way in python to return all or some attributes of each record after it has been inserted (mainly the unique ID created from the trigger)?

Thanks in advance and hope I described this clearly.

Wes

Outcomes