Page 1 of 1

Handling two different jobs

Posted: Fri Nov 06, 2009 5:22 am
by Vishal1982
Hi All,

I have two server jobs in my project.First job say Job1 loads data from PRODUCT to FACT_PRODUCT table.Second job Say Job2 also follows the same procedure except it takes only those rows from PRODUCT table which are updated or newly inserted after completion of Job1 or after some timestamp.

Here i would like to execute these jobs conditionally based on the initial data load.If FACT_PRODUCT table doesn't contain any records then the execution on job sequence should be like Job1=>Job2 and if FACT_PRODUCT contains already certain records then Job2 should be executed directly.

Please let me know how i can achieve this ?
For this shall i use job sequence or whether needs to make setting in server job itself.

Waiting for Reply

Thanks,
VJ

Posted: Fri Nov 06, 2009 7:43 am
by chulett
Sounds like you need a precursor job to determine "if FACT_PRODUCT contains already certain records", whatever certain records means. Then a Sequence job could determine what to run next.

Posted: Fri Nov 06, 2009 1:50 pm
by ray.wurlod
For example the precursor job could simply write the count into its user status area, which the triggers from the precursor job's Job activity can interrogate directly to determine what happens next.

Code: Select all

  precursor  ----->  Job2
     |
     +----->  Job1  ----->  Job2