I am hvaing SOURCE as
1000,null,null,null
null,2000,null,null
null,null,3000,null
null,null,null,4000
Now i want the OUTPUT as
1000,2000,3000,4000
For more clarification i want to elimate nulls and want in
a single line.
Please help me out
Answers were Sorted based on User's Feedback
Answer / guest
Let suppose the data are as these fields
A B C D
1000,null,null,null
null,2000,null,null
null,null,3000,null
null,null,null,4000
In the mapping take A,B,C,D as input ports.set 4 output
ports for the same 4 input ports like out_A,out_B,out_C,out_D.
For out_A output port set value like-IIF(ISNULL(A),1000,A).
Similary for out_B-IIF(ISNULL(B),2000,B)
likewise for C,D.
if you don't want to hard code 1000,2000 in the expressions
written above just create 4 variable port like
var_A,Var_B,var_C,var_D before creating the output ports and
each variable port set max(A) for var_A,max(B) for var_B
port likely.
put each variable port name against 1000,2000,3000 and 4000
in respective expression.
as example for out_A set IIF(ISNULL(A),var_A,A)
Now take 4 output ports to a aggrerator transformation.set
group by any one port but not all ports at a time.
Join the ports to target.
Hurry you get result like this
1000,2000,3000,4000
Regards
Sukanta
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / kondeti srinivas
it is so simple
write a query like this
SELECT MAX(A),MAX(B),MAX(C),MAX(D) FROM TABLE_NAME
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / adisekhar
FROM THE ABOVE ANSWER WE HAVE TO ADD NORMALIZER TRANSFORMATION
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / madhavi
In the lookup transformation->properties->presql condtion
write delete from table_name where column_name="NULL";.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / arunakumari l
let us take column names as col1,col2,col3,col4
STEP1:Add normalizer and place occurs value as 4
STEP2:use filter to eliminate null values
STEP3:take expression transformation and use concat
function to concatenate row values
i think this might work
tell me if i am wrong
| Is This Answer Correct ? | 0 Yes | 0 No |
Without using any transformations how u can load the data into target?
Can yoU use the maping parameters or variables created in one maping into another maping?
What are the rank caches?
If my source is having 30 million records, so obviously the cache could not be allocated with sufficient memory. What needs to be done in this case?
.prm wirh repalce .txt is possible?
what is diff b/t sorter t/r and agg have the option sorter property...
1 lac of flat fles in source how to load target at a time?
Why use shortcuts(Instead of making copies).
I have a source either file or db table Eno ename sal dept 101 sri 100 1 102 seeta 200 2 103 lax 300 3 104 ravam 76 1 105 soorp 120 2 Want to run a session 3 times. First time: it should populate dept 1 Second time: dept 2 only Third time: dept 3 only How can we do this?
Briefly define reusable transformation?
I need an oracle query for convert Char to Integer?. Can any one help me how to do this?
How can you join 3 tables? Why cant you use a single Joiner to join 3 tables.