Page 1 of 1

Redbrick bulk loader

Posted: Thu Jan 09, 2003 8:25 am
by jan_moolman
Hi
Does anybody have an idea on how to pass error messages back to the data stage bulk loader job?
The idea is to stop data stage from continuing with other jobs until the job has completed successfully. There must be a setting you set in redbrick that will allow the error message to be passed back to the session that is currently open.


If any body has worked with this please help?




Jan Moolman

Posted: Thu Jan 09, 2003 4:54 pm
by ray.wurlod
rb_tmu is a well-formed executable, so its error output is on stderr which you can redirect where you will.
The Red Brick bulk loader stage (if you set it to automatic) will execute rb_tmu with file names, etc., as specified in the link properties.
Because rb_tmu (or rb_ptmu) is optimized for speed (especially if you are using optimized loading specified in rbw.config), you do not get row-by-row reporting. Instead, a log file is maintained and a discards file is maintained. In fact, more than one discards file may be maintained, you can have a separate one for duplicates, results for which will not be complete until the load is finished.
Therefore, there is no "real time" mechanism for providing feedback into the DataStage job.
What you need to do is to create a before/after subroutine that checks the existence/size of the log and discards files, and makes a decision about whether continue on this basis. Or you could do it in job control code or in a sequence.
Note that, if you set the "Load Automatically" property to "N", then none of the above applies; DataStage merely creates the files needed by rb_tmu but does not execute it.