Page 1 of 1

spaces causing null handling issue

Posted: Fri Sep 04, 2009 12:05 pm
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.

Posted: Fri Sep 04, 2009 2:24 pm
by mekrreddy
Any solutions please???

Posted: Fri Sep 04, 2009 2:57 pm
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?

Posted: Fri Sep 04, 2009 3:16 pm
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.

Posted: Fri Sep 04, 2009 3:18 pm
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.

Posted: Fri Sep 04, 2009 3:36 pm
by mekrreddy
sorry abou that...
:oops:

Posted: Fri Sep 04, 2009 10:55 pm
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.

Posted: Fri Sep 04, 2009 11:25 pm
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.

Posted: Tue Sep 08, 2009 8:35 am
by mekrreddy
Thanks Hullet,

it worked....