how to sort two columns in single job in datastage.
Answer Posted / 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 View All Answers
how to sort two columns in single job in datastage.
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
− min_lvl between 0 and 25 inclusive.
− Same column types and headings as Jobs.txt.
− Include column names in the first line of the output file.
− 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
− min_lvl between 26 and 100 inclusive.
− Same format and derivations as Target file 1.
• Target file 3: HighLevelJobs.txt
− min_lvl between 101 and 500 inclusive.
− Same format and derivations as Target file 1.
• Rejects file: JobRejects.txt
− min_lvl is out of range, i.e., below 0 or above 500.
− This file has only two columns: job_id and reject_desc.
− reject_desc is a variable-length text field, maximum
length
100. It should contain a string of the form: “Level out of
range:
Can you explain repository tables in datastage?
How to perform incremental load in datastage?
What is difference between join, merge and lookup stage?
How to reverse the string using SQL?
Different ways a project can be moved to production ?...example ….export-import and Version control.
how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?
What are the components of ascential data stage?
explain about citrix scheduling tool in datastage
Terminate Activity
Describe routines in datastage? Enlist various types of routines.
What are the different types of lookups in datastage?
In Informatica,for the table I can find coreesponding dependent mappings.Likewise can I find the dependent jobs with all the information by using the table name
What is the purpose of interprocessor stage in server jobs?