teradata api stage

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
shamik_CHAK
Participant
Posts: 4
Joined: Tue May 08, 2007 2:44 am
Location: delhi

teradata api stage

Post by shamik_CHAK »

hi,

WE ARE TRYING TO RUN AGGREAGATION SQL QUERY THROUGH DATASTAGE USING THE TERADATA API STAGE ON TERADATA DATWAREHOUSE,THE PROBLEM THAT I AM FACING IS THAT EVEN IF THE QUERY ENCOUNTERS SOME PROBLEM AND DOESN'T RUN PROPERLY THE DATASTAGE STILL FINISHES WITH A "FINISHED(SEE LOG)" MESSAGE .IS THERE ANY WAY TO DO THIS SO THAT THE DATASTAGE JOB ABORTS INSTEAD OF JUST FIRING A WARNING IN CASE THE QUERY DOES NOT RUN?

PLEASE REPLY.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Welcome.

First thing to note is that posting in ALL CAPS is considered SHOUTING. We use our inside voices here. :wink:

Secondly, I haven't played with the Teradata stages. Does it have a option to 'Treat Warnings as Fatal'? That could be one way to force an abort. Another way might be to set a very low Warning Limit when running the job.

What kind of 'query problems' are you encountering and what are the warnings being logged? If they are specific enough, I would think you could use a message handler to 'promote' the warning up to something fatal... yes?
-craig

"You can never have too many knives" -- Logan Nine Fingers
shamik_CHAK
Participant
Posts: 4
Joined: Tue May 08, 2007 2:44 am
Location: delhi

Post by shamik_CHAK »

hi,

i am actually trying a sequencer of jobs which fires queries using the api stage,now the trouble is that if suppose the query gets a duplicate primary key error even then the job finishes with a finished state and hence the sequencer proceeds to the next job in it.

what i have tried is i have attached a terminator activity and i have directed the job to finish if jobstatus is 2(finished with warnings) or 3(aborted) ,but the probs with this is that the job gets aborted on any kind of warning generated!

and can any one tell me whether the api stage behaves in exactly the same way as the queryman or other database utilities?
if it is then why it is so roundly advised to do any aggregation using database utilities and not thru ds?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

shamik_CHAK wrote:if it is then why it is so roundly advised to do any aggregation using database utilities and not thru ds?
That advice relates to the Aggregator stage - why pull data out and do the 'aggregation' in DS when one of the supposed strengths of the database is its aggregation ability?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply