problems with invalid dates

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
datastagedw
Participant
Posts: 53
Joined: Fri Mar 07, 2008 1:17 am

problems with invalid dates

Post by datastagedw »

i have the data coming form flat files. i have date columns as char(8).for example:20080115. this is not a problem wherein i can convert it into date data type in the transfomer.
I also have dates coming from some other column in the source as char(6) eg:PQ0115. There is business logic for this like P means 0 and Q means 1 so the date is actually 2001-01-15.For this i am using a logic in transformer and converting it.
i have the following warning coming in the log :

Tfm_IP_ID,3: Conversion error calling conversion routine date_from_string data may have been lost

i am able to convert the dates but i do not want the warnings.

i also need to mention here that i do hav some invalid dates like PQ0183

so not very sure whther the warnings are because of these invalid dates.

please check this.
ETL DEVELOPER
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How do you expect US to check it? You need to build in your own validation rules. Read the field as VarChar and work in a Transformer.

You can effect import to date datatype for the CCYYMMDD format by specifying an appropriate format string in the extended column properties. But there is nothing you can do during import to handle the PQ... format strings. These must be done in a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply