IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 20, 2015, 1:19:35 PM (11 years ago)
Author:
heather
Message:

current state of ipptopsps / sas37 - ob/p2/st/df work

File:
1 edited

Legend:

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

    r37763 r37917  
    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    '''
     
    424430
    425431    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)"
     432        #sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, diffobjID from \
     433        #(select @r:=0) r, "+table+" t) as foo using (diffobjID) set \
     434        #uniquePspsDFid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)"
     435        sql = "UPDATE DiffDetection set uniquePspsDFid = (("+str(self.batchID)+"*1000000000 ) + row)"
    429436        try: self.scratchDb.execute(sql)
    430437        except:
Note: See TracChangeset for help on using the changeset viewer.