Facing problem with the constraint in the transformer stage

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
rajeevm
Participant
Posts: 135
Joined: Sun Jan 22, 2006 10:44 am

Facing problem with the constraint in the transformer stage

Post by rajeevm »

Hi All,

I am trying to populate two stage tables at the same time where I need to populate one with the following constraint in the transformer stage :

Dep_datetime - 28 days and Dep_datetime-21 days all the records coming from source with this condition should go into stage table B

and the rest should go into stage table A which has this condition and as well as Dep_datetime - 35 days and Dep_datetime-28 days

but both the tables are populating with same number of records when I check thru view data.

When I checked the Director to see whether there are any warnings then I got the warning with phantom

DataStage Job 2385 Phantom 30704
Program "JOB.562395293.DT.1419133094.TRANS1": Line 156, Nonnumeric data when numeric required. Zero used.

I didn't understand why this happens .

As I have in the constraint of the transformer stage to populate stage table B as :
ExtractData.DEP_DATETIME -28 and ExtractData.DEP_DATETIME - 21

how could I mention this as ExtractData.DEP_DATETIME -28 days in the transformer stage.

Thanks for the input
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Re: Facing problem with the constraint in the transformer st

Post by DeepakCorning »

I think you are not defining the Constraints Properly. Also the explanation of which Table gets what data is somewhat not clear. I assume it is Stage table 1 gets data which is in between Dep_datetime - 28 days and Dep_datetime-21 and so on.

Also i guess the column Dep_datetime is a date time column and hence you will have to convert it before doing any calculation on it.
rajeevm
Participant
Posts: 135
Joined: Sun Jan 22, 2006 10:44 am

Post by rajeevm »

Hi Deepak ,
you got it correct that
Stage 1 table gets all the data with both the conditions but i want to get the stage 2 populated only with dep_datetime -28 days and dep_datetime-21 days how could I convert that column into days and give the condition in the transformer stage.

Please help me out
Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You've got something non numeric in your data when a numeric was required (perhaps in an arithmetic expression or function). This may or may not be the date columns that you are reporting about - you will need to do some detective work to determine where the data issue is occurring.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

Hi,

Still your question is not so clear. What is the datatype of dep_datetime?

Most of the issues could be easily solved if you could post some sample data (Input data and Output data). That would give us a better picture of what you are trying to achieve.

If you are planning to post the sample data, make sure you post it in the proper format by using the 'preview' button.

Thanks,
Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

The simplest thing that you can do it put some seq file in the process and ppulate it with your dep_date column and and also try subtracting days from it and populate in this file. If it populkates with null theres ur answer that u can not directly subtract days from a date.
Post Reply