warning- Query returns no rows

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

warning- Query returns no rows

Post by bkumar103 »

Hi,

I have a Teradata Enterprise stage which is the source and it loads the data into the target stage-teradata tpump. This loading is based on the user defined SQl at the source Teradat Enterprise stage. But this query returns no result set. Datastage logs a warning stating "Query returned no results. No read will be performed".

Can somebody help with removing this warning?

Thanks :)
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Are you asking how to remove the warning message from the log or how to fix the 0-rows problem? For the first the answer is "message handlers", but without more information nobody here can answer the second.
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

There is no help for it that I am aware of. You'll have to use a MsgHandler or run the SQL beforehand to see if there are rows to load in some kind of overly complicated Sequence. We use a MsgHandler and demote the warning to Informational so that the wrapper shell script doesn't return a failure.
I don't think it is reasonable to throw a warning to the log upon no rows returned but that's the way IBM coded the stage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Warnings are not necessarily for bad things, they are also alerts for unusual things. In the ordinary course of events DataStage does not expect to process zero rows, so it alerts the operator when a query returns zero rows.

This is the underlying philosophy behind the "Warning" severity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

@ throbinson & ArndW

Can u please explain how i can implement MsgHandler in my job?

@ ArndW

Yeah.. I just want to remove that warning message. i have no problem with the query returning zero rows.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why do you want U to explain? U does not log in all that often.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

@ ray.wurlod

sorry... i meant You... :)
ccatania
Premium Member
Premium Member
Posts: 68
Joined: Thu Sep 08, 2005 5:42 am
Location: Raleigh
Contact:

Post by ccatania »

In Director/ Tools/ Message Handler Management, you can set it for the specific job or for the project,
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

right-mouse click on the warning message in the director, then choose "Add rule to message handler" and continue from there.
ccatania
Premium Member
Premium Member
Posts: 68
Joined: Thu Sep 08, 2005 5:42 am
Location: Raleigh
Contact:

Post by ccatania »

Corret That works as well, just though I would give him the long version to Ray's point, Not heavy user, gets longer version no short cuts. :lol:
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

@ ccatania & Arndw

Thanks a lot :) It works fine now :)
Post Reply