Page 1 of 1

warning- Query returns no rows

Posted: Tue Mar 11, 2008 6:14 am
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 :)

Posted: Tue Mar 11, 2008 6:23 am
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.

Posted: Tue Mar 11, 2008 6:24 am
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.

Posted: Tue Mar 11, 2008 5:52 pm
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.

Posted: Wed Mar 12, 2008 5:23 am
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.

Posted: Wed Mar 12, 2008 5:25 am
by ray.wurlod
Why do you want U to explain? U does not log in all that often.

Posted: Wed Mar 12, 2008 5:34 am
by bkumar103
@ ray.wurlod

sorry... i meant You... :)

Posted: Wed Mar 12, 2008 6:20 am
by ccatania
In Director/ Tools/ Message Handler Management, you can set it for the specific job or for the project,

Posted: Wed Mar 12, 2008 6:28 am
by ArndW
right-mouse click on the warning message in the director, then choose "Add rule to message handler" and continue from there.

Posted: Wed Mar 12, 2008 6:32 am
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:

Posted: Mon Mar 17, 2008 12:51 am
by bkumar103
@ ccatania & Arndw

Thanks a lot :) It works fine now :)