top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

load multiple columns data into single column in informatica?

+2 votes
2,348 views

I want to load multiple columns data into single column in informatica.

posted Aug 19, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

+2 votes

Use the Expression Transformation to Concatenate all the desired columns and map it with target.

answer Aug 19, 2013 by Shatark Bajpai
Thank you shatark sir,
This is input
id  val
1   a
1   b
1   c

I want this out put  
id  val1  val2   val3
1   a       b         c

How to do sir, Please explain sir, I have to know this answer
Its better u register, registered people has better chances of answer. And this is very old thread so better to ask fresh query with full detail.
+2 votes

Suppose your source data data is like below:

id val
1  A
1  B
1  C

and your desired output is like :

1 ABC

If I understood your problem correctly, Then use expression and aggregator transaformation. In expression transformation, concat val column with the help of using variable port like below.

id --- I/O port
val -- I/O port
v_prev_id = id  --- Variable port
v_val = iif(v_prev_id = v_curr_id, v_val || val, val)  --- Variable port
v_curr_id = id  --- Variable port
o_val = v_val -- output port

data after expression transformstion would be like below:

id o_val
1   A
1   AB
1   ABC

Take an Aggregarator after expression , and chhose id as group by. and pass id and o_val port to your target. It will give your desired output.

If your data is like (1, A, B, C) and your desired output is (1,ABC) Then what Shatark sir suggested is correct answer.

answer Aug 19, 2013 by Nandan Kumar
Described in the best way.
I have one column that consist of 3 rows i.e (ABC). This data splitted to 3 columns
input       output
c1           c1   c2   c3
a             a     b     c
b
c

Please send this answer
I think Nandan has described the same.
If you still have some query please ask the separate question as this is very old thread.
Similar Questions
+1 vote

how to convert single to multiple columns, please any body know this answer please tell me, if you have video send me please

+1 vote

In my source table data is

s_name,p_name,value
s1 ,   p1,     10
s1 ,   p2,     xyz
s1 ,   p3 ,    abc
s2 ,   p1 ,    20
s2 ,   p2 ,    xyz
s2 ,   p3 ,    abc

I want two target tables, first table is based on s_name s1, second table based on s_name s2. Both table contains contains p_name and value.

The target table data like as

Table s1

p_name,value 
p1,    10
p2,    xyz
p3,    abc 

Table s2

p_name,value 
p1,    20
p2,    xyz
p3,    abc 
+1 vote

I have data in table A as below

Assetid   attribute   value
    1546    Ins_date   05062011
    1546    status     active
    1546    X          10.4567
    1546    Y          27.56
    1546    size       17
    675     X          4.778
    675     Y          53.676
    675     depth      5
    675     st_date    06092010

I have data as above in table A. This table has many Assetids 1546,675,....etc. attributes might vary for assets.

I want output as below:

assetid  ins_date  status  X        Y       Size  depth  st_date
1546     05062011  active  10.4567  27.56   17    null   null
675      null      null    4.778    53.676  null  5      06092010

I have created Stored procedure, then called in Informatica to achieve this output. However, since i have large volume of data, it is taking much time to load.

Please suggest me other easy and best way to load it.

+1 vote

I have a scenario wherein the data is present in just single row. with multiple columns. The number of columns may extend if new record is inserted.

name city name city name city name city......
N1 C1 N2 C2 N3 C3 N4 C4.....

i want to write the output of this data to a fixed width flat file through informatica like below:

N1 C1
N2 C2
N3 C3
N4 C4

Please suggest..


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...