DataStage Scenarios

5
DataStage Scenarios (Job Tasks) 1. Design a Job which performs i have source like i want target like this balance, draw_time balance, draw_time 20000, 8.30 20000, 32.30 50000,10.20 50000,22.20 3000,4.00 3000,16.00 2. Design a Job which performs 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 Compiled by: Mohammed Hafiz InfoSphere DataStage 8.0.1

description

DataStage Scenarios

Transcript of DataStage Scenarios

Page 1: DataStage Scenarios

DataStage Scenarios (Job Tasks)

1. Design a Job which performsi have source like i want target like this balance, draw_time balance, draw_time 20000, 8.30 20000, 32.3050000,10.20 50000,22.203000,4.00 3000,16.00

2. Design a Job which performs i have source likedeptno, sal1,20002,30003,40001,23004,50005,1100

i want target liketarget1deptno, sal1,20003,40004,5000

target22,30001,23005,1100

3. Design a Job which performsi have source data likeempno, enmae11 ,aa12 ,bbi want output likeempno, ename11 ,aa12 ,bb

Compiled by: Mohammed Hafiz InfoSphere DataStage 8.0.1

Page 2: DataStage Scenarios

11 ,aa12 ,bb

4. Design a Job which performsa. Count the number of all records in a EMP table b. Count the number of deptno in a EMP table

5. Design a Job which performsa. dept no wise to find maximum, minimum, and sum of rows, and intarget two company wise maximum?

6. Source table emp_name, sal_dept1,sal_dept2,sal_dept3 find the person who has lowest sal in dept3 and what is his max sal?Emp_name, sal_dept1,sal_dept2,sal_dept3 Abby,23000,33000,13000Sunny,24000,14000,17000Ronny,22000,16000,19000Mark,66000,19000,25000Joyson,19000,18000,30000Willy, 66000, 19000, 14000Lavelle, 14000,17000,34000

7. Design a Job which a. uses multiple source of input into a single input sequential file stage.b. which depicts the Sparse, Range lookups (Separate Jobs for each lookups)c. In employee table (Don’t know how many records available) then task is to show first/last

record outputted to a file.

8. Design a Job which performs a. Only DEPTNO 10 to target1b. Condition SAL>1000 and SAL<3000 satisfied records to target2c. Only DEPTNO 20 where clause = SAL<1000 and SAL>3000 to target3d. Reject data to target4

9. Design a Job which performs a. All records from source to target1 b. Only DEPTNO=30 to target2 c. Where clause = SAL<1000 and SAL>3000 for all deptno to target3 d. Reject data to target4

10. Design a Job which performs a. All unique records of DEPTNO to target1 b. All duplicates records of DEPTNO to target2

Compiled by: Mohammed Hafiz InfoSphere DataStage 8.0.1

Page 3: DataStage Scenarios

c. All records to target3 d. Only DEPTNO 10 records to target4 e. Condition SAL>1000 & SAL<3000, but no DEPTNO=10 to target5

11. Design a Job which performs Input:- 100|aa,cc,bb,dd 200|aa 330|mm,nn 440|aa,cc,dd,ee,ff,gg

Output:- 440,cc 440,ee 440,gg 100,cc 100,dd 330,nn 200,aa 440,aa 440,dd 440,ff 100,aa 100,bb 330,mm

12. Design a Job which performs

Table 1

a b c

--- ---- ---

1 2 3

4 5 6

Compiled by: Mohammed Hafiz InfoSphere DataStage 8.0.1

Page 4: DataStage Scenarios

Table 2

d e f

--- --- ---

p q r

s t u

Expected output:

================

a b c d e f

-- -- -- -- -- --

1 2 3 p q r

4 5 6 s t u

How can we achieve this in DS job?

Compiled by: Mohammed Hafiz InfoSphere DataStage 8.0.1