Connector - After SQL issuing warnings

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
syedmuhammedmehdi
Participant
Posts: 43
Joined: Wed Feb 12, 2014 12:34 pm
Location: Hyderabad, India

Connector - After SQL issuing warnings

Post by syedmuhammedmehdi »

In Oracle connector stage I'm executing one After SQL after loading a table. I have set After SQL fail to "No". That is if the After SQL statement fails due to any constraint or any issue then job should not fail. However my job is still throwing a warning due to the failure of After SQL statement.

In my job the After SQL is insert statement. It fails when the same record keys are already present in that table. So, my requirement is if that same record is already present in table then my job should not fail and ignore (No warning) and if that record is not present then it should insert.

I thought this Set After fail to "No" will work but it is throwing warning. Could you please suggest a better solution?

Thanks.
SyedMuhammadMehdi
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

I re-worded your topic a bit to make it clear I thought you were asking for. Please check to insure it still states your problem requirements. I'm assuming you are updating some sort of log? If you could give more details as to what exactly you are trying to accomplish with the After SQL it might help.

However, your options are very limited in an After SQL statement. As you've found out, just because it doesn't fail doesn't mean it won't issue a warning.

There are two options that spring to mind.
1) Demote that warning to "informational" in the job. Not my preference (it never is), but that's fast.
2) Instead of using After SQL to output the record, divert the data to a sequential file or data set. Then use a second job that post that data using a regular connector which can do an insert / update statement which won't fail or issue a warning.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply