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

How to RD using transformer?

0 Answers   CTS,


What are the enhancements made in datastage 7.5 compare with 7.0?

0 Answers  


1. How many People are part of your Team? 2. Explain how you create jobs or flow of project? 3. Join Stage vs Lookup vs Merge Stage 4. Summation scenario based question - How you find sum of salary for a specific employee (Explain stages and flow of job)? 5. Explain Remove duplicates stage ? Can you do sort in this stage? 6. SQL Questions - Joins - Types, Difference between Join and Union 7. Unix Questions - How you run the Job, How you list all jobs in project 8. Explain Environmental Variables? 9. SQL Scenario - If you have 3 Identical record in a Table, Ex: 1, Ram, Xyz; 1, Ram, Xyz; 1, Ram, Xyz; Delete only 2 of the records and keep only 1 using the Delete query. How you will you do this?

1 Answers  


What is exact difference between Parallel Jobs and server Jobs..

8 Answers   DELL, IBM,


What is a datastage job?

0 Answers  


1.i have 5 jobs(1-5),i connect with each other,i want run from 3-5 only how? 2.how to schedual the job in datastage7.5 2? what is the deff bet grip and fgrep command? how do you cleanse the data in your project

1 Answers   Accenture,


State the difference between an operational datastage and a data warehouse?

0 Answers  


i have source data like empno,enmae 11 ,aa 12 ,bb i want output like empno,ename 11 ,aa 12 ,bb 11 ,aa 12 ,bb

7 Answers   TCS,


I have a scenario like Deptno=10---->First record and last record Deptno=20---->First record and last record Deptno=30---->First record and last record I want those first and last records from each department in a single target. How to do this in DataStage, any one can assist me. Thanks in advance.

8 Answers  


create a job that splits the data in the Jobs.txt file into four output files. You will direct the data to the different output files using constraints. • Job name: JobLevels • Source file: Jobs.txt • Target file 1: LowLevelJobs.txt &#8722; min_lvl between 0 and 25 inclusive. &#8722; Same column types and headings as Jobs.txt. &#8722; Include column names in the first line of the output file. &#8722; Job description column should be preceded by the string “Job Title:” and embedded within square brackets. For example, if the job description is “Designer”, the derived value is: “Job Title: [Designer]”. • Target file 2: MidLevelJobs.txt &#8722; min_lvl between 26 and 100 inclusive. &#8722; Same format and derivations as Target file 1. • Target file 3: HighLevelJobs.txt &#8722; min_lvl between 101 and 500 inclusive. &#8722; Same format and derivations as Target file 1. • Rejects file: JobRejects.txt &#8722; min_lvl is out of range, i.e., below 0 or above 500. &#8722; This file has only two columns: job_id and reject_desc. &#8722; reject_desc is a variable-length text field, maximum length 100. It should contain a string of the form: “Level out of range: <min_lvl>”, where <min_lvl> is the value in the min_lvl field. My Question is how do you write the stage variable for reject rows.

0 Answers   HCL,


What are the partition techniques available in your last project?

1 Answers  


what is the difference between the join and look up explin me one exmple

3 Answers  


Categories