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.
Answer Posted / prabhu
source->sortstage->removeduplications->dataset
in sortstage->create key changecolumn=true
after
removeduplicates stage->duplicates retain:-last
we can get last and first record group wise.
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What are data elements?
CHANGE CAPTURE
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
Explain entity, attribute and relationship in datastage?
what is the use of surogate key 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:
Field,NVL,INDEX,REPLACE,TRANSLATE,COLESC
Name the command line functions to import and export the DS jobs?
Where the datastage stored his repository?
AGGREGATOR default datatype
How can you write parallel routines in datastage PX?
Where do the datastage jobs get stored?
whom do you report?
What is the Environment Variable need to Set to TRIM in Project Level?(In transfermer, we TRIM function but I need to impliment this project level using Environment variable)
How to create a file using vi editor? 2)how to delete a file in vi editor? 3)How to connect the server datastage to unix? what r the command lines we r using? 4)30 jobs r runnig in unix i want to find out my job. how to do this? give me command?