hi my source is::
empno,deptno,salary
1, 10, 3.5
2, 20, 8
2, 10, 4.5
1, 30, 5
3, 10, 6
3, 20, 4
1, 20, 9
then target should be in below form...

empno,max(salary),min(salary),deptno
1, 9, 3.5, 20
2, 8, 4.5, 20
3, 6, 4, 10
can anyone give data flow in data stage for the above
scenario....

thanks in advance...

Answer Posted / pankaj das, orator

Just take...
source -> aggregate stage -> target

And then in aggregate stage in output tab just specify

col name groupby derivation
------- ------- ----------
id group by id
max_sal max(sal)
min_sal min(sal)
deptno deptno

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is job control?

622


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

602


How to reverse the string using SQL?

889


1)s.key generate 1 to 700 records today. tomorrow another 400 will updated how to update the records using s.key generator? 2)source is like :-- DB --> T/F stage1 --> seq1file T/f 1 is linking with T/F2 ---> seq 2 how to load the data? in source i given some conditions those r going in seq1. The another data will going to seq2 how to do this ?

1623


Difference between IBM DATA STAGE8.5 and DATA STAGE9.1 ?

3376






What are the benefits of datastage?

721


What are the functionalities of link collector?

623


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: ”, where is the value in the min_lvl field. My Question is how do you write the stage variable for reject rows.

2187


How do you import and export data into datastage?

699


what is repositery?

1293


Explain datastage architecture?

815


What are data elements?

657


What are iconv and oconv?

771


Can you explain tagbatch restructure operator?

699


Name the command line functions to import and export the DS jobs?

705