- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTools/share/disttool_pending_raw.sql (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/ippTools/share/disttool_pending_raw.sql
r25838 r27838 3 3 distRun.label, 4 4 distTarget.dist_group, 5 stage,6 stage_id,5 'raw' AS stage, 6 rawExp.exp_id AS stage_id, 7 7 rawImfile.class_id AS component, 8 8 clean, 9 9 rawExp.camera, 10 CONCAT_WS('.', outroot, CONVERT(distRun.dist_id, CHAR)) as outdir, 11 rawImfile.uri as path_base, -- change this once rawImfile has path_base 10 CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as outdir, 11 -- XXX: replace this with rawImfile.path_base once it exists 12 TRIM(TRAILING '.fits' FROM rawImfile.uri) AS path_base, 13 CAST(NULL AS CHAR(255)) AS alt_path_base, 12 14 chipProcessedImfile.path_base as chip_path_base, 13 15 CAST(NULL AS CHAR(255)) AS state, … … 18 20 FROM distRun 19 21 JOIN distTarget USING(target_id, stage, clean) 20 JOIN rawExp ON rawExp.exp_id = stage_id 22 JOIN rawExp ON rawExp.exp_id = stage_id AND distTarget.stage = 'raw' AND distRun.alternate = 0 21 23 JOIN rawImfile USING(exp_id) 22 JOIN chipRun ON chipRun.exp_id = rawExp.exp_id andchipRun.magicked24 JOIN chipRun ON chipRun.exp_id = rawExp.exp_id AND chipRun.magicked 23 25 JOIN chipProcessedImfile 24 26 USING(chip_id, class_id) … … 33 35 AND (rawExp.magicked OR distRun.no_magic) 34 36 UNION 37 -- raw stage alternate inputs 38 SELECT 39 distRun.dist_id, 40 distRun.label, 41 distTarget.dist_group, 42 'raw' AS stage, 43 rawExp.exp_id AS stage_id, 44 rawImfile.class_id AS component, 45 clean, 46 rawExp.camera, 47 CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as outdir, 48 -- XXX: replace this with rawImfile.path_base once it exists 49 TRIM(TRAILING '.fits' FROM rawImfile.uri) AS path_base, 50 magicDSFile.backup_path_base AS alt_path_base, 51 chipProcessedImfile.path_base AS chip_path_base, 52 CAST('full' AS CHAR(255)) AS state, 53 CAST('full' AS CHAR(255)) AS data_state, 54 0 as quality, 55 distRun.no_magic, 56 rawImfile.magicked 57 FROM distRun 58 JOIN distTarget USING(target_id, stage, clean) 59 JOIN rawExp ON rawExp.exp_id = stage_id AND distTarget.stage = 'raw' AND distRun.alternate = 1 60 JOIN rawImfile USING(exp_id) 61 JOIN magicDSRun ON magicDSRun.stage = 'raw' AND magicDSRun.stage_id = rawExp.exp_id 62 JOIN magicDSFile ON magicDSRun.magic_ds_id = magicDSFile.magic_ds_id 63 AND rawImfile.class_id = magicDSFile.component 64 JOIN camRun USING(cam_id) 65 JOIN camProcessedExp USING(cam_id) 66 JOIN chipProcessedImfile USING(chip_id, class_id) 67 LEFT JOIN distComponent 68 ON distRun.dist_id = distComponent.dist_id 69 AND rawImfile.class_id = distComponent.component 70 WHERE 71 distRun.state = 'new' 72 AND distRun.clean = 0 73 AND distComponent.dist_id IS NULL 74 AND chipProcessedImfile.data_state = 'full' 75 AND chipProcessedImfile.magicked > 0 76 UNION 35 77 -- raw stage clean (dbinfo only) 36 78 SELECT … … 38 80 distRun.label, 39 81 distTarget.dist_group, 40 stage,41 stage_id,82 'raw' AS stage, 83 rawExp.exp_id AS stage_id, 42 84 'exposure' AS component, 43 85 clean, 44 86 rawExp.camera, 45 CONCAT_WS('.', outroot, CONVERT(distRun.dist_id, CHAR)) as outdir,87 CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as outdir, 46 88 CAST(NULL AS CHAR(255)) AS path_base, 89 CAST(NULL AS CHAR(255)) AS alt_path_base, 47 90 CAST(NULL AS CHAR(255)) AS chip_path_base, 48 91 CAST(NULL AS CHAR(255)) AS state, … … 53 96 FROM distRun 54 97 JOIN distTarget USING(target_id, stage, clean) 55 JOIN rawExp ON exp_id = stage_id98 JOIN rawExp ON rawExp.exp_id = stage_id 56 99 LEFT JOIN distComponent 57 100 ON distRun.dist_id = distComponent.dist_id
Note:
See TracChangeset
for help on using the changeset viewer.
