IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 15, 2012, 1:05:44 PM (14 years ago)
Author:
rhenders
Message:

when attempting to add PSPS_OBJ_ID column, catch exception and continue as we may have aborted after this step on a previous ingest attempt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/dvo.py

    r33259 r33272  
    403403           self.scratchDb.createIndex(cptTableName, "OBJ_ID")
    404404
     405           self.logger.infoPair("Adding","PSPS objIDs")
     406           # first try to add a column for PSPS_OBJ_ID. catch failure and continue
     407           try:
     408               sql = "ALTER TABLE " + cpmTableName + " ADD COLUMN (PSPS_OBJ_ID BIGINT)"
     409               self.scratchDb.execute(sql)
     410           except:
     411               self.logger.infoPair("Already added PSPS_OBJ_ID column to", cpmTableName)
     412               
    405413           # shove PSPS objIDs from cpt table into measurement table
    406            self.logger.infoPair("Adding","PSPS objIDs")
    407            sql = "ALTER TABLE "+cpmTableName+" ADD COLUMN (PSPS_OBJ_ID BIGINT)"
    408            self.scratchDb.execute(sql)
    409414           sql = "UPDATE " + cpmTableName + " AS a, " + cptTableName + " AS b \
    410415                  SET a.PSPS_OBJ_ID = b.EXT_ID \
Note: See TracChangeset for help on using the changeset viewer.