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

we run a job in 4 nodes,i want to run same job on 8 nodes is it possible? job recompling is mandtory?why?

1 Answers   HSBC, NTT Data,


hi iam new to this tooliam cmpltied to know abt datastage so now iam in project tell me whole step by step what iam doing iwnt to go with exp so plz hlp me pals

0 Answers  


if i have two tables table1 table2 1a 1a,b,c,d 1b 2a,b,c,d,e 1c 1d 2a 2b 2c 2d 2e how can i get data as same as in tables?chandu how can i implement scd typ1 and type2 in both server and in parallel?chandu field1 field2 field3 suresh , 10,324 , 355 , 1234 ram , 23,456 , 450 , 456 balu ,40,346,23 , 275, 5678 how to remove the ,inthe fields?

2 Answers  


i/p o/p1 o/p2 1 1 4 1 1 5 1 1 6 2 2 2 2 2 2 3 3 4 5 6 how to populates i/p rows into o/p1&o/p2 using datastage stages?and also the same scenario using sql?

8 Answers   IBM,


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

0 Answers  






eno ename esal acct1 acct2 amount1 amount2 100 suresh 10000 sbi1 sbi2 1000 2000 this is our sourse data i would loke to disply like this eno ename esal acct amount 100 suresh 10000 sbi1 1000 100 suresh 10000 sbi2 2000

2 Answers   HCL,


source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TARGET2 TARGET2 235

6 Answers   US Technology,


Can we use Round Robin for aggregator?is there any benefit underlying?

3 Answers   TCS,


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  


You enter values in a schema file for RCP and you also entered values in sequential file? which one will it take?

1 Answers   TIAA CREF,


input like 2 7 8 9 5 1 7 3 6 output:2 5 6 how to find out this plz explain?

2 Answers   HSBC,


I have a source table with column name CITY having 100 records, I want target table with column name start with 'A' and 'B',remaining columns as reject outputs. how can achieve this by data stage?please help me?????

5 Answers  


Categories