Page 1 of 1

Sybase IQ Bulk Loader

Posted: Mon Oct 16, 2006 3:30 am
by ewartpm
Hi Guys

I'm using the bulk loader because of high data volumes. In the bulk loader I have the option to code a delete statement. The delete will delete any data loaded for a period and then re-load the data being pushed to it. This has been done to cater for re-runnability.

However, if no rows go down the link the delete statement is still invoked. It seems as though DataStage will invoke the bulk loader just because it is in the job.

I have tried the @INROWNUM, @OUTROWNUM in the constraint to no avail. Even did a lookup doing a "select count(*) etc" and put the linkname.numrows > 0 in the constraint. The bulk loader still gets invoked when the rows on the link are zero :?

Does anyone have a workaround/answer for this one?

Posted: Mon Oct 16, 2006 4:13 am
by ArndW
If you have DataStage just create the data and control files and not execute the bulk loader you can add your own logic to an after-job subroutine to optionally invoke the loader process or not. This can be in Ds/BASIC code or a UNIX shell script, whichever fits your needs and abilities best.

Posted: Mon Oct 16, 2006 4:34 am
by ewartpm
Thanks for the reply. However, the client does not want to use the 'after job' option.

Posted: Mon Oct 16, 2006 4:39 am
by ArndW
That kind of limits your options. Perhaps you could add a "sacrificial" record to the file so that the bulk loader has something to do?

Posted: Mon Oct 16, 2006 8:40 am
by ray.wurlod
ewartpm wrote:Thanks for the reply. However, the client does not want to use the 'after job' option.
Just had something similar with the new flight security rules. After taking the ink from my fountain pen (because it's liquid, all 1.5ml of it) they wanted me to fill out some forms. What's wrong with this picture?

:wink: You could always put in an after-stage routine in the final active stage, thus being able to assert truthfully that you have not used an after-job subroutine.

Posted: Mon Oct 16, 2006 8:48 am
by DSguru2B
Smart :wink: