Column for Null values Missing...
Moderators: chulett, rschirm, roy
Column for Null values Missing...
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....
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.
-
- Premium Member
- Posts: 187
- Joined: Thu Apr 14, 2011 5:10 pm
Re: Column for Null values Missing...
Code: Select all
DataSet(the Dataset Comes from an Extract Job) =====> Transformer =====> Seq File
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
Thank you
Re: Column for Null values Missing...
Hi ,
i used the peek stage and still i am not able to get the Column 4 - 'STP' populated.
i used the peek stage and still i am not able to get the Column 4 - 'STP' populated.
Sri.
-
- Premium Member
- Posts: 187
- Joined: Thu Apr 14, 2011 5:10 pm
Re: Column for Null values Missing...
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
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
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...?
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 187
- Joined: Thu Apr 14, 2011 5:10 pm
Hi ,
Still I am trying to understood your problem![Smile :)](./images/smilies/icon_smile.gif)
Out put data :
This can happen ..means "no value" for col4 for "3 rows".."value is different from column "..
Thank you
Still I am trying to understood your problem
![Smile :)](./images/smilies/icon_smile.gif)
Let me try this way:why i am not able to see the Column 4 - STP for txn ===>Null,
Out put data :
Code: Select all
col1,col2,col3,col4
row1..3 a,b,c,-
row4...11. n,m,d,g
Thank you
You can do NULL arithmetic and concatenations but the result will always be NULL, so there is not much use.ray.wurlod wrote:No operation is permitted on NULL.
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