how to sort two columns in single job in datastage.



how to sort two columns in single job in datastage...

Answer / srinivas

We can do this by using the sort stage.

Specify the key columns what ever the you are sort.

Specify column name sort specifications
For example i have 3 columns data like below

Name score rank

abc 85 1
bcd 74 3
abc 82 2
bcd 67 4

When u r sort based on first two colmns

u have to specify two colmn names and specificaton

Like: Name Asc, Score Dsc.

Then u will get the output like below.

Name score rank
abc 85 1
abc 82 2
bcd 74 3
bcd 67 4

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Data Stage Interview Questions

what is hash file

2 Answers   CTS, IBM,


Explain the ChangeApply stage?

11 Answers  


What is size of a transaction and an array means in a datastage?

0 Answers  


i have source like deptno,sal 1,2000 2,3000 3,4000 1,2300 4,5000 5,1100 i want target like target1 deptno,sal 1,2000 3,4000 4,5000 target2 2,3000 1,2300 5,1100 with out using transformerstage

6 Answers  


What is developer responsibilities in UAT (user acceptance testing and Post implementation phase?

0 Answers  


How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?

0 Answers   Reliance,


What are the partition techniques available in your last project?

1 Answers  


How you Remove the Dataset in Unix?

5 Answers  


Tell me the syntax of Configuration file?

1 Answers  


how to find no.of records in sequntial file itself?

4 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  


country, state 2 tables r there. in table 1 have cid,cname table2 have sid,sname,cid. i want based on cid which country's having more than 25 states i want to display?

3 Answers   Wipro,


Categories