Sybase IQ Bulk Loader

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ewartpm
Participant
Posts: 97
Joined: Wed Jun 25, 2003 2:15 am
Location: South Africa
Contact:

Sybase IQ Bulk Loader

Post 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?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ewartpm
Participant
Posts: 97
Joined: Wed Jun 25, 2003 2:15 am
Location: South Africa
Contact:

Post by ewartpm »

Thanks for the reply. However, the client does not want to use the 'after job' option.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Smart :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply