How we can convert rows to columns in datastage?

Answers were Sorted based on User's Feedback



How we can convert rows to columns in datastage?..

Answer / krishna

hai vinod

this is krishna,when i try to use your method using copy &
funnel stages,its not working because when we are dividing
copy stage into sub copys after that when we are club in
funnel stage from cpy1 it was not supporting o/p link,it
support reject link too funnel

Is This Answer Correct ?    3 Yes 0 No

How we can convert rows to columns in datastage?..

Answer / rams

Using pivot stage


ex:-


name,ph1,ph2
ramu,9849,9948
raja,9987,9967
touch,9898,0909


in pivoi stage go to output>- columns


columnname derivation

name
phone PH1,PH2

TO GOT THE RESULT IS


o/p:-

name phone
ramu,9849
ramu 9948
raja,9987
raja,9967
touch,9898
touch,0909

Is This Answer Correct ?    7 Yes 6 No

How we can convert rows to columns in datastage?..

Answer / manohar palla

I am going to use tranformer and funnel stages to implement the
pivot functionality.


name ph1 ph2---> tranformer--->tf1 name ph1
| funnel---->o/p
|____>tf2 name ph2

tf1 and tf2 are the TWO links from transfomer..

in tf1 we have the name and ph1 where in tf2 name and ph2.

In funnel stage i am going to club the two links and send it
to o/p.


Thanks :)

Is This Answer Correct ?    2 Yes 2 No

How we can convert rows to columns in datastage?..

Answer / upputuri.vinod

Bro that's right I have another ans as-well..

I am going to use copy and funnel stages to implement the
pivot functionality.


name ph1 ph2---> copy--->cp1 name ph1
| funnel---->o/p
|____>cp2 name ph2

CP1 and CP2 are the TWO links from COPY..

in cp1 we have the name and ph1 where in cp2 name and ph2.

In funnel stage i am going to club the two links and send it
to o/p.


THE BENEFIT IN THIS IS WE CAN USE PIVOT UPTO 3250 ROWS
ONLY.. AFTER THAT IT WONT WORK..

SO WE CAN USE IT...

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More Data Stage Interview Questions

I HAVE EMP TABLE, 4 COLS R THERE COL1,COL2,COL3,COL4 ID-- 101,102,103,104 SAL-- 1000,4000,2000,5000 DATE-- COLUMN. I WANT TO DISPLAY THE DATA PREVIOUS MONTH HIGEST SAL ?

2 Answers   Wipro,


How many Nodes configuration file you used in your last project?

1 Answers  


if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?

1 Answers   IBM,


Tell me the syntax of Configuration file?

1 Answers  


HOw Hash Partion Works Thank you in Advance i have doubts on Hash Partion TEch Could please give me the clear understandable notation example e_id,dept_no 1,10 2,10 3,20 4,20 5,30 6,40 i have TWo Nodes/Three Nodes My questions are: 1).if i select hash key as e_id how Hash partion will distribute the data in to two NOdes/three NOdes 2).if i select hash key as dept_no how Hash partion will distribute the data in to two NOdes/three NOdes sivakumar.katta7@gmail.com

5 Answers   FIS,






Hi Every one, I have a scenario plz suggest me 1)On daily we r getting some huge files data so all files metadata is same we have to load in to target table how we can load? 2) One column having 10 records at run time we have to send 5th and 6th record to target at run time how we can send? Hi plz help me for above scenarios and If any one is having JobSequence kindly send me one example and the scenario to my mail ID(nrvdwh@gmail.com)

3 Answers   HSBC,


Source Like department_no, employee_name ---------------------------- 20, R 10, A 10, D 20, P 10, B 10, C 20, Q 20, S and Output should be like this department_no, employee_list -------------------------------- 10, A 10, A,B 10, A,B,C 10, A,B,C,D 20, A,B,C,D,P 20, A,B,C,D,P,Q 20, A,B,C,D,P,Q,R 20, A,B,C,D,P,Q,R,S

3 Answers  


Define Merge?

0 Answers  


Hi guys, please design job for this, MY INPUT IS COMPANY,LOCATION IBM,CHENNAI IBM,HYDRABAD IBM,PUNE IBM,BANGLOORE TCS,CHENNAI TCS,MUMBAI TCS,BANGLOORE WIPRO,HYDRABAD WIPRO,CHENNAI HSBC,PUNE MY OUTPUT IS COMPANY,LOCATION,COUNT IBM,chennai,hydrabad,pune,banglore,4 TCS,chennai,mumbai,bangloore,3 WIPRO,hydrabad,chennai,2 HSBC,pune,1 Thanks

3 Answers   IBM,


I/p : F1 table have A,B,C,D,E and F2 table having C,E,V i need output 0utput1: ABD output2: V any one suggest me this

0 Answers  


I have source file which contains duplicate data,my requirement is unique data should pass to one file and duplicate data should pass another file how?

7 Answers   CTS,


How to read multiple files at different directories using a single Sequential File stage in DS Enterprise Edition

6 Answers   TCS,


Categories