IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 28, 2007, 12:01:22 PM (19 years ago)
Author:
jhoblitt
Message:

refactor chiptool & db to preserve metadata history

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/backtrack/ippTools/share/chiptool_completely_processed_exp.sql

    r13403 r13990  
    1 -- select * from chipPendingExp
    2 -- where exp_tag is not in chipProcessedExp
    3 -- where exp_tag is not in chipPendingImfile
    4 -- where the number of entries in chipProccessedImfile matches the .imfiles
    5 -- entry in rawExp
     1-- the output of this query must match the format of chipRun row
    62SELECT DISTINCT
    7     chipPendingExp.*,
    8     rawExp.imfiles,
    9     chipProcessedImfile.class_id
    10 FROM chipPendingExp
    11 JOIN rawExp
    12     ON chipPendingExp.exp_tag = rawExp.exp_tag
    13 LEFT JOIN chipProcessedExp
    14     ON chipPendingExp.chip_id = chipProcessedExp.chip_id
    15 LEFT JOIN chipPendingImfile
    16     ON chipPendingExp.chip_id = chipPendingImfile.chip_id
    17 LEFT JOIN chipProcessedImfile
    18     ON chipPendingExp.chip_id = chipProcessedImfile.chip_id
    19 WHERE
    20     chipProcessedExp.chip_id IS NULL
    21     AND chipPendingImfile.chip_id IS NULL
    22     AND chipProcessedImfile.chip_id IS NOT NULL
    23     AND chipProcessedImfile.fault = 0
    24 GROUP BY
    25     chipPendingExp.chip_id
    26 HAVING rawExp.imfiles = COUNT(chipProcessedImfile.class_id)
     3    chip_id,
     4    state,
     5    workdir,
     6    workdir_state,
     7    label,
     8    reduction,
     9    expgroup,
     10    dvodb
     11FROM
     12    (SELECT DISTINCT
     13        chipRun.*,
     14        rawExp.imfiles,
     15        chipProcessedImfile.exp_tag,
     16        chipProcessedImfile.class_id
     17    FROM chipRun
     18    JOIN chipPendingImfile
     19        USING(chip_id)
     20    JOIN rawExp
     21        ON chipPendingImfile.exp_tag = rawExp.exp_tag
     22    LEFT JOIN chipProcessedImfile
     23        USING(chip_id)
     24    WHERE
     25        chipProcessedImfile.chip_id IS NOT NULL
     26        AND chipProcessedImfile.exp_tag IS NOT NULL
     27        AND chipProcessedImfile.class_id IS NOT NULL
     28        AND chipProcessedImfile.fault = 0
     29    GROUP BY
     30        chipProcessedImfile.class_id,
     31        chipProcessedImfile.exp_tag
     32    HAVING rawExp.imfiles = COUNT(chipProcessedImfile.class_id)) as Foo
Note: See TracChangeset for help on using the changeset viewer.