spaces causing null handling issue

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
mekrreddy
Participant
Posts: 88
Joined: Wed Oct 08, 2008 11:12 am

spaces causing null handling issue

Post by mekrreddy »

Hello,
In one of our jobs the source data spaces, and datastage is trimming those spaces and making it null and eventually the records are rejected, is there a way to handle that.? i am loading form dataset to oraclae stage.

thanks in advance.
mekrreddy
Participant
Posts: 88
Joined: Wed Oct 08, 2008 11:12 am

Post by mekrreddy »

Any solutions please???
hiral.chauhan
Premium Member
Premium Member
Posts: 45
Joined: Fri Nov 07, 2008 12:22 pm

Post by hiral.chauhan »

Hi mekrreddy,

A couple questions:

Is that a key field where you get nulls?

Do you actually want nulls in your field? What is the business rule for that?


You can put a condition saying "If input.field = '' then 'NONE' Else input.field"

Does that make sense?
Thanks,
Hiral Chauhan
mekrreddy
Participant
Posts: 88
Joined: Wed Oct 08, 2008 11:12 am

Post by mekrreddy »

Thanks Hiral,


That is a notnull field(not a key field), and space is coming into that field from source DB.
we are extracting the table from Oracle ---> Dataset.

and the loading to target table. in btw the space is trimmed in datastage and the field become null, and as the field is not nullable, gets rejected.

some one suggested me to chane the delimiter to pipe but how we can set the delimiter in dataset??

Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

mekrreddy wrote:Any solutions please???
This is offensive. You waited less than two hours. These were the "wee small hours" in my time zone and I was asleep.

DSXchange is an all-volunteer site, whose members post when they can, if they have something to say.

If you want rapid response, sign up with your support provider for priority service and learn just how expensive "urgent" really is.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mekrreddy
Participant
Posts: 88
Joined: Wed Oct 08, 2008 11:12 am

Post by mekrreddy »

sorry abou that...
:oops:
laknar
Participant
Posts: 162
Joined: Thu Apr 26, 2007 5:59 am
Location: Chennai

Post by laknar »

Trim the field when extracting from table itself.
Or have a transformer before dataset and do the null handling.

You have to make sure the Field Value length must be less then the Column length.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's not DataStage, it's something Oracle does. Search here for $APT_ORACLE_PRESERVE_BLANKS to find previous conversations on the subject.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mekrreddy
Participant
Posts: 88
Joined: Wed Oct 08, 2008 11:12 am

Post by mekrreddy »

Thanks Hullet,

it worked....
Post Reply