IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 12, 2014, 2:58:40 PM (12 years ago)
Author:
heather
Message:

cleaning up the schema, and adding uniquePsps()id to all tables. Populated in
all except FO/FW/DF/DO (those are still in progress)

File:
1 edited

Legend:

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

    r37577 r37592  
    607607
    608608    '''
     609    Updates table and generates pspsuniqueids
     610    '''
     611
     612    def updatePspsUniqueIDs(self,table):
     613        sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, objID from \
     614        (select @r:=0) r, "+table+" t) as foo using (objID) set \
     615        uniquePspsP2id = ((" +str(self.batchID)+ "*1000000000 ) + rownum)"
     616        try: self.scratchDb.execute(sql)
     617        except:
     618            self.logger.errorPair('failed sql',sql)
     619            return
     620       
     621    '''
    609622    Does the processing, i.e. pulling stuff from IPP tables into PSPS tables
    610623    '''
     
    637650        results['NULLOBJID'] = self.scratchDb.reportAndDeleteRowsWithNULLS("Detection_" + chipname, "objID")
    638651        #self.logger.info("deleted nulls")
     652        self.logger.info("add psps unique p2 ids")
     653        self.updatePspsUniqueIDs("Detection_" + chipname, self.imageIDs[chipname])
    639654        self.updateImageID("Detection_" + chipname, x, y)
    640655        #self.logger.info("updateImageId")
Note: See TracChangeset for help on using the changeset viewer.