Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

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

I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

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

I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

Answer / adisekhar

FROM THE ABOVE ANSWER WE HAVE TO ADD NORMALIZER TRANSFORMATION

Is This Answer Correct ?    1 Yes 0 No

I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

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

I am hvaing SOURCE as 1000,null,null,null null,2000,null,null null,null,3000,null null,null,nul..

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

Post New Answer

More Informatica Interview Questions

How to transform normalized data to denormalized form in informatica? Is there any logic or any transformations to achieve this?

3 Answers  


how to join the 2 different table with different columns in informatica?

5 Answers   Accenture,


What you know about transaction control transformation?

0 Answers  


How to calculate the cache size if say we are doing a performance check on a mapping and found that a particular cache needs to be changed. Is there a formula to calculate this! i know that informatica has a auto option available but how to calculate manually?

1 Answers  


if i have 10 records in my source,if we use router t/r and given the condition as i>2,i=5 and i<2in the different groups what is the o/p in the target

5 Answers   TCS,


why we are using surogate key in real time give me explanation

2 Answers   TCS,


design of staging area?

0 Answers  


What is the Rank index port in Rank transformation?

0 Answers   Informatica,


What is deployment group?

0 Answers  


how to get flatfile containg 10 records half records one target another half another target

2 Answers  


I have a flat file, in which i have two fields, emp_id, emp_name. The data is like this, emp_id,emp_name 101,soha 101,ali 101,khan 102,siva 102,shanker 102,reddy. how to merge the names so that my output is like this Emp_id Emp_name 101 Soha ali kahn 102 siva shenkar reddy please provide solution

5 Answers  


what is mapping override?

2 Answers   Cap Gemini,


Categories