Column for Null values Missing...

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
srinath51
Participant
Posts: 61
Joined: Wed Aug 31, 2011 10:47 am
Location: United States

Column for Null values Missing...

Post by srinath51 »

Hi All,

My path is as Following :

DataSet(the Dataset Comes from an Extract Job) =====> Transformer =====> Seq File

i am generating a sample text file,i have Four columns in the file i.e; SEQ,REC,TXN,STP & there are total of 11 Rows.

the Column "TXN" has Null Values for 3 rows,so i am using this in the transformer logic :
If IsNull( READ_Data.OWSC32_TXN) Then Space(5) Else READ_Data.OWSC32_TXN

so finally when i run and see the Output file Why the column 4 "STP" is missing for the 3 rows that has Null values for "TXN"

the three columns are being concatenated into a single column....

Please help me out....
Last edited by srinath51 on Wed Feb 22, 2012 1:17 pm, edited 1 time in total.
Sri.
Developer9
Premium Member
Premium Member
Posts: 187
Joined: Thu Apr 14, 2011 5:10 pm

Re: Column for Null values Missing...

Post by Developer9 »

Code: Select all

DataSet(the Dataset Comes from an Extract Job) =====> Transformer =====> Seq File
Hi,

Please make sure your mapping is proper ..

you can always check your transformation logic by writing it to PEEK stage

Code: Select all

source >>xfm (apply transformation logic for the field)>>peek stage
This way you can get more clear picture about "particular column"..

Thank you
srinath51
Participant
Posts: 61
Joined: Wed Aug 31, 2011 10:47 am
Location: United States

Re: Column for Null values Missing...

Post by srinath51 »

Hi ,

i used the peek stage and still i am not able to get the Column 4 - 'STP' populated.
Sri.
Developer9
Premium Member
Premium Member
Posts: 187
Joined: Thu Apr 14, 2011 5:10 pm

Re: Column for Null values Missing...

Post by Developer9 »

Hi,

Can you able to "view data "for the "Column 4 - 'STP' "..?? do a "mapping as-is .i.e..straight mapping "

There shouldn't be any problem ..

Thank you
srinath51
Participant
Posts: 61
Joined: Wed Aug 31, 2011 10:47 am
Location: United States

Post by srinath51 »

Hi,

when i do the mapping 1-1,i can view the data.in fact the data for the Column 3 -TXN is 'Null' for 3 rows and remaining 8 rows there are values for that Column.

But when i concatenate then why i am not able to see the Column 4 - STP for txn ===>Null,But i can see the Col 4 for the remaining 8 rows...?
Sri.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No operation is permitted on NULL. You can't do arithmetic, you can't concatenate. All you can do is test for whether or not a value is NULL (or is not NULL).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Developer9
Premium Member
Premium Member
Posts: 187
Joined: Thu Apr 14, 2011 5:10 pm

Post by Developer9 »

Hi ,

Still I am trying to understood your problem :)
why i am not able to see the Column 4 - STP for txn ===>Null,
Let me try this way:

Out put data :

Code: Select all

             col1,col2,col3,col4
row1..3      a,b,c,-
row4...11.   n,m,d,g
This can happen ..means "no value" for col4 for "3 rows".."value is different from column "..

Thank you
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

ray.wurlod wrote:No operation is permitted on NULL.
You can do NULL arithmetic and concatenations but the result will always be NULL, so there is not much use.

That appears to be what's happening here in the original post. Concatenating anything with NULL results in NULL.

Perhaps one of the other columns, such as column 4 "STP," contains NULLs that also need to be handled.
Choose a job you love, and you will never have to work a day in your life. - Confucius
srinath51
Participant
Posts: 61
Joined: Wed Aug 31, 2011 10:47 am
Location: United States

Post by srinath51 »

Ok,i will check any null values for the Col 4 - 'STP'
Sri.
Post Reply