Date field is populated with Junk value

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
Puli
Participant
Posts: 53
Joined: Mon May 26, 2008 2:59 am
Location: Australia

Date field is populated with Junk value

Post by Puli »

Hi ,
I have a look up stage in which i perform look up based on a key filed and retrieve a date field. But when i dont have a match, the retrieved date field is expeted to be NULL. But in my case , a junk value is coming in this date field '0001-0-01'. The date field which is coming from the look up is made Nullable, but still same problem exists.

Please give your thoughts.

Regards
Puli
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi,

Make sure you have set the nullability to Yes in all the stages after the lookup stage.

--Rich
Puli
Participant
Posts: 53
Joined: Mon May 26, 2008 2:59 am
Location: Australia

Post by Puli »

I have done the same and still it is giving same error
v2kmadhav
Premium Member
Premium Member
Posts: 78
Joined: Fri May 26, 2006 7:31 am
Location: London

Post by v2kmadhav »

Puli

Are you saying datastage is defaulting the null to that 0001-0-01?

Is that how it exists in your lookup source?? if its consistently giving you a value like 0001-0-01 can you not use a transformer to convert that into a default value which is more acceptable?

cheers
VM
Puli
Participant
Posts: 53
Joined: Mon May 26, 2008 2:59 am
Location: Australia

Post by Puli »

I am getting the junk value 0001-01-01 as date value when there is no match in look up.SO anyway it is not cominf from the look up table. But we cannot tell that in all such cases i will be getting 0001-01-01 as the default value when no look up match.
v2kmadhav
Premium Member
Premium Member
Posts: 78
Joined: Fri May 26, 2006 7:31 am
Location: London

Post by v2kmadhav »

what is your lookup? table, dataset, file??

Did you double check if those failures are valid. ( the key doesnt find a match)

So you are saying whenever a lookup fails instead of a null it brings a value like 0001-01-01?
Puli
Participant
Posts: 53
Joined: Mon May 26, 2008 2:59 am
Location: Australia

Post by Puli »

in fact what exactly the look up doing is , comparing the source data with the target table. So in a case where no records are present in the target table, then i got this type of error.
v2kmadhav
Premium Member
Premium Member
Posts: 78
Joined: Fri May 26, 2006 7:31 am
Location: London

Post by v2kmadhav »

does your log look clean?? do any of your warning suggest something is wrong?

i would imagine that you might have already double checked your datatypes and nullable properties..

i tried replicating that and looks alright to me... all i see is nulls.
Post Reply