IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2015, 8:28:32 PM (11 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150112/ippToPsps/jython/diffbatch.py

    r37763 r38052  
    327327        self.logger.infoPair("need to cull"," nulls objid")
    328328        results= self.scratchDb.reportAndDeleteRowsWithNULLS("DiffDetection", "diffObjID")
     329        self.logger.infoPair("Adding 'row' columns to", "DiffDetection tables")
     330        # diff has a primary key, so use this instead
     331        self.scratchDb.addRowCountColumnNoKey("DiffDetection", "row")
    329332        self.logger.infoPair("adding","uniquePSPSDFid")
    330333        self.updatePspsUniqueIDs("DiffDetection")
     334        self.logger.infoPair("Dropping row column from", "DiffDetection table")
     335        self.scratchDb.dropColumn("DiffDetection", "row")
     336 
    331337
    332338    '''
     
    417423               AND b.imageID = " + str(imageID)
    418424
    419         self.scratchDb.execute(sql)
    420 
     425        try: self.scratchDb.execute(sql)
     426        except:
     427            self.logger.infoPair("failed sql",sql)
     428            raise
    421429    '''
    422430    Updates table and generates pspsuniqueids
     
    424432
    425433    def updatePspsUniqueIDs(self,table):
    426         sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, diffobjID from \
    427         (select @r:=0) r, "+table+" t) as foo using (diffobjID) set \
    428         uniquePspsDFid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)"
     434        #sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, diffobjID from \
     435        #(select @r:=0) r, "+table+" t) as foo using (diffobjID) set \
     436        #uniquePspsDFid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)"
     437        sql = "UPDATE DiffDetection set uniquePspsDFid = (("+str(self.batchID)+"*1000000000 ) + row)"
    429438        try: self.scratchDb.execute(sql)
    430439        except:
Note: See TracChangeset for help on using the changeset viewer.