Saturday, 3 January 2009

How to transpose data in Informatica

Suppose we are having input data coming as

Firstname1
Ph1
Address1

Firstname2
Ph2
Address2

Firstname3
Ph3
Address3

You want data in output like i.e. you want to convert 9 rows into 3 rows with similar group together

Firstname1 Ph1 Address1
Firstname2 Ph2 Address2
Firstname3 Ph3 Address3

You can create a mapping by following these steps

  1. Create a SQ with one input field Field1

  2. Add a expression transformation after SQ

  3. Link Field1 from SQ to expression Transformation

  4. Add a new op port name grp =substr(FIELD1,length(FIELD1),1)

  5. Add a aggregator transformation after Expression and drag Field1 and Grp field

  6. Have grp as group by fieldAdd three new port OP_FLD1=LAST(FIELD1,SUBSTR(FIELD1,1,1)='f')OP_FLD2=LAST(FIELD1,SUBSTR(FIELD1,1,1)='p')OP_FLD=LAST(FIELD1,SUBSTR(FIELD1,1,1)='a')
  7. Add OP_FLD1,OP_FLD2,OP_FLD3 to target

6 comments:

  1. Hi there,

    Its a very good site to visit.
    well I am looking for some realtime implementation of CDC using PowerExchange. can U pls guide us
    Thanks

    Kalycs.dwh@gmail.com

    ReplyDelete
  2. Thanks...We will try to publish article on implementation of CDC using power exchange.

    ReplyDelete
  3. Hi,
    Does any have any idea or information regarding informatica power exchange and cdc implementation.
    Please share with us as soon as possible.

    Thanks in advance!

    ReplyDelete
  4. Good work keep it up .Would like to see more real time questions and answers.

    ReplyDelete
  5. Good work, but i have a question, the exaple that you have given is specific, could you please give us the general exaplce

    ReplyDelete
  6. Could you please publish article on implementtation of CDC using Power Exchange

    ReplyDelete