Skip to content

Commit

Permalink
Handle null oid response
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-M-Waldman committed Oct 12, 2024
1 parent 4e24451 commit 3205f49
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions databridge_etl_tools/oracle/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,12 @@ def load(self):
cursor.execute(oid_stmt)
oids = cursor.fetchall()[0][0]
sde_registered = False
if 'OBJECTID_' in oids:
raise AssertionError('Nonstandard OBJECTID columm detected! Please correct your objectid column to be named just "OBJECTID"!!')
if 'OBJECTID' in oids:
sde_registered = True
print('objectid found, assuming sde registered.')
if oids:
if 'OBJECTID_' in oids:
raise AssertionError('Nonstandard OBJECTID columm detected! Please correct your objectid column to be named just "OBJECTID"!!')
if 'OBJECTID' in oids:
sde_registered = True
print('objectid found, assuming sde registered.')

# Create a temp table name exactly 30 characters in length so we don't go over oracle 11g's table name limit
# and then hash it so that it's unique to our table name.
Expand Down

0 comments on commit 3205f49

Please sign in to comment.