Page 1 of 1

How to handle full refresh situation if job fails?

Posted: Mon Dec 03, 2012 9:49 am
by bond88
Hi,
How to handle the situation if a job fails in full refresh? I mean in full refresh first it is going to truncate table and then it will start insert new records. If there is any primary key violation or some other error might causes to fail that job then at that time target would be ended up with no data. I want to have atleast previous data (before truncating).

Thanks,

Posted: Mon Dec 03, 2012 10:37 am
by BI-RMA
DataStage won't backup data for you if you choose to truncate your target table. An alternative would be to rename the original table in before-SQL, let DataStage create a new target-table for you. This way you can cleanup easily in case of errors at the cost of keeping a renamed copy of your original data at least until the current load has finished successfully.

Posted: Mon Dec 03, 2012 10:42 am
by bond88
@BI-RMA

Thank you,
Currently I am doing that, I am using stage objects and once if it is successful then I am copying to target from stage objects. I was wondering there is anyway to handle this situation without using stage objects.

Thanks,