This pl/sql mod is to fix handling of foreign datasets. The pipeline was retrieving all runs from the foreign task, not just the one run needed at a time. This was shown to work in test on Dan's demo foreign task pipeline (and subsequently in prod on our reprocessing task).

Here's the diff between new and old. ('--' and everything after is a pl/sql comment)

The new query uses the runname to restrict the selected dataset list.

Dan

glast01:dflath> diff pdbprocedures.sql ~glastdpf/pdb/pdbprocedures.sql 949c949,950
< and T.Task_PK = DS.Task_FK;

> and
> T.Task_PK = DS.Task_FK;
2293c2294
< where TaskProcess_PK = TaskProcess_FK_in;

> where TaskProcess_pk = TaskProcess_FK_in;
2296,2314c2297,2310
< select T.TaskName, DS.DatasetName, DSI.FilePath, DSI.FileName, R.Run_PK, R.RunName --, DSI.DSInstance_PK
< from DSInstance DSI, Task T, Dataset DS, Run R
< where DSI.Run_FK in
< (select Run_PK from Run where RunName =
< (select RunName
< from Run
< where Run_PK = Run_FK_in
< )
< and Task_FK != Task_FK_in
< )
< and DSI.Dataset_FK in
< (select Dataset_FK
< from TP_DS
< where TaskProcess_FK = TaskProcess_FK_in
< and RW = 'R' – note: with task_fk != task_fk_in cut, above, this is probably redundant
< )
< and DSI.Dataset_FK = DS.Dataset_PK
< and DS.Task_FK = T.Task_PK
< and R.Run_PK = DSI.Run_FK;

> – select DS.DATASETNAME, DSI.FILEPATH, DSI.FILENAME, T.BaseFilePath, T.TaskName, R.Run_PK, R.RunName;
>
> select T.TaskName, DS.DATASETNAME, DSI.FILEPATH, DSI.FILENAME, R.Run_PK, R.RunName
> from Dataset DS, DSInstance DSI, Task T, Run R
> where DS.Dataset_PK in
> (select Dataset_FK from TP_DS
> where TaskProcess_FK = TaskProcess_FK_in
> and RW = 'R')
> and DSI.Run_FK = R.Run_PK
> and R.Run_PK = Run_FK_IN
> and DSI.Dataset_FK = DS.Dataset_PK
> – and T.Task_PK = DS.Task_FK
> and T.Task_PK = R.Task_FK
> and T.Task_PK != Task_FK_in;

  • No labels