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 |
If there are more than one sessions running parallel in a worklet, which will be the last session ?
What is the need of building a data warehouse?
Which transformation should u need while using the cobol sources as source defintions?
Mapplets ( can you use source qyalifier, can you use sequence generator, can you use target)
How the informatica server sorts the string values in Rank transformation?
what is left outer join?
what is data driven in update strategy transformation?
What is the meaning of up gradation of repository?
What is Test load plan? Let us assume 10 records in source, how many rows will be loaded into target?
Filter transformation in the condition one of the data is NULL would the record be dropped.
I have id, seq_no date, bill_amt and weight 1,11,'01-Jan-2014',100,2 2,12,'01-Jan-2014',40,5 3,13,'01-Jan-2014',32,5 4,14,'01-Jan-2014',98,2 5,15,'01-Jan-2014',105,3 6,16,'01-Jan-2014',11,3 1,11,'02-Jan-2014',40,2 2,12,'02-Jan-2014',100,5 3,13,'02-Jan-2014',132,5 4,14,'02-Jan-2014',198,2 5,15,'02-Jan-2014',15,3 6,16,'02-Jan-2014',16,3 Now I need output as date MXAMT_LSTWGHT MINAMT_GRTWGHT 01-Jan-2014 100 32 02-Jan-2014 198 100 Could not think of mapping to do so. Please help
How to use Normalizer transformation?