Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Solve the problem

Exe 1: -

Source Main Input file: -

ID Name Country_Code Country_Name


1 Suresh IN India
2 Kiran IND India
3 Eric CN China
4 Corona CHN China
5 Mark US United states of America
6 Luke USA United states of America
7 Azeed AE United Arab Emirates
8 Abdul ARE United Arab Emirates

Source Reference data

Ctry_2_CD Ctry_3_CD Country_Name


IN IND India
CN CHN China
US USA United states of America
AE ARE United Arab Emirates

Target File output required

ID Name Ctry_2_CD Ctry_3_CD Country_Name


1 Suresh IN IND India
2 Kiran IN IND India
3 Eric CN CHN China
4 Corona CN CHN China
United states of
5 Mark US USA America
United states of
6 Luke US USA America
7 Azeed AE ARE United Arab Emirates
8 Abdul AE ARE United Arab Emirates

Exe 2: -
NUMBE LOCATIO
FNAME LNAME R N
Suresh Manchi 12 UK
Kiran Maru 13 CHINA
Naresh Krishna 14 USA
Suresh Manchi 15 INDIA
Kiran Maru 11 CHINA

i) Separate the both Unique records and duplicates each different files by Using Sort stage.
ii) Separate the both Unique records and duplicates each different files by Using Aggregator
stage.

Exe 3: - Calculate cumulative salary using stage variables concept for Employee data file below.

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO


7369 smith CLERK 7902 17-12-1980 800 0 20
7654 MARTIN SALESMAN 7698 28-09-1981 1250 1400 30
7839 KING PRESIDENT 17-11-1981 5000 0 10
7902 FORD ANALYST 7566 03-12-1981 3000 0 20
7499 allen SALESMAN 7698 20-02-1981 1600 300 30
7698 BLAKE MANAGER 7839 01-05-1981 2850 0 30
7844 TURNER SALESMAN 7698 08-09-1981 1500 0 30
7934 MILLER CLERK 7782 23-01-1982 1300 0 10
7521 ward SALESMAN 7698 22-02-1981 1250 500 30
7782 CLARK MANAGER 7839 09-06-1981 2450 0 10
7876 ADAMS CLERK 7788 23-05-1987 1100 0 20
1234 JOHN MGR 7839 29-04-1984 2000 200 50
7566 JONES MANAGER 7839 02-04-1981 2975 0 20
7788 SCOTT ANALYST 7566 19-04-1987 3000 0 20
7900 JAMES CLERK 7698 03-12-1981 950 0 30

Exe 4: - Loading the employee data(exe3 file data) into excel file.

Source file (Exe 3 input file).

Loading excel file -> EMP_Excel.xlsx

Exe 5: - Create a Job sequence (Mode- Sequential) as the below order Exe1, Exe2, Exe3 and Exe4

And apply the file watcher stage before starting on the stage.
Exe-6 (Display the Details of Employees of working in 10th Department)

Input is Sequential File with the following input Data

EMPNO ENAME JOB MGR SAL COMM DEPTNO

7369 SMITH CLERK 7902 800 0 20

7499 ALLEN SALESMAN 7698 1600 300 30

7521 WARD SALESMAN 7698 1250 500 30

7566 JONES MANAGER 7839 2975 0 20

7654 MARTIN SALESMAN 7698 1250 1400 30

7698 BLAKE MANAGER 7839 2850 0 30

7782 CLARK MANAGER 7839 2450 0 10

7788 SCOTT ANALYST 7566 3000 0 20

7839 KING PRESIDENT 5000 0 10

7844 TURNER SALESMAN 7698 1500 0 30

7876 ADAMS CLERK 7788 1100 0 20

7900 JAMES CLERK 7698 950 0 30

7902 FORD ANALYST 7566 3000 0 20

7934 MILLER CLERK 7782 1300 0 10

1234 JOHN MGR 7839 2000 200 50

Using the following processing Stages get the Output of who are working in the 10th
Department,

a) Transformer Stage
b) Filter Stage
c) Switch Stage
Output is a Sequential File.

Exe-7 (Display the Details of Employees of working in 10th Department and other
department records send into Rejected File)

Input is Sequential File with the following input Data

See the Above emp file as Input Sequential File.


Using the following processing Stages get the Output of who are working in the 10th
Department and other department records send into Rejected File

a) Transformer Stage b) Filter Stage and c) Switch Stage Output is a Sequential File.

Exe-8 Use Join stages to join the following two inputs file using Deptno as key column
and try following types of join operation.

a. Inner join
b. Left-outer join
c. Right-outer join
d. Full-outer join

Input Files

Dept file

Employee file

EMPNO ENAME JOB MGR SAL COMM DEPTNO

7369 SMITH CLERK 7902 800 0 20

7499 ALLEN SALESMAN 7698 1600 300 30

7521 WARD SALESMAN 7698 1250 500 30

7566 JONES MANAGER 7839 2975 0 20

7654 MARTIN SALESMAN 7698 1250 1400 30

7698 BLAKE MANAGER 7839 2850 0 30

7782 CLARK MANAGER 7839 2450 0 10

7788 SCOTT ANALYST 7566 3000 0 20

7839 KING PRESIDENT 5000 0 10

7844 TURNER SALESMAN 7698 1500 0 30

7876 ADAMS CLERK 7788 1100 0 20

7900 JAMES CLERK 7698 950 0 30

7902 FORD ANALYST 7566 3000 0 20

7934 MILLER CLERK 7782 1300 0 10

1234 JOHN MGR 7839 2000 200 50


Exe -9 Use Lookup stage and above question’s (Exe-3) input file and try following
Lookup options for unmatched records,

a) Continue

b) Drop
c) Reject
b) Fail

Exe-10 Using the Merge Stage Join the Following two Tables

Master Dataset Input File(Dept File)

Update Dataset Input File (Employees File)

EMPNO ENAME JOB MGR SAL COMM DEPTNO

7369 SMITH CLERK 7902 800 0 20

7499 ALLEN SALESMAN 7698 1600 300 30

7521 WARD SALESMAN 7698 1250 500 30

7566 JONES MANAGER 7839 2975 0 20

7654 MARTIN SALESMAN 7698 1250 1400 30

7698 BLAKE MANAGER 7839 2850 0 30

7782 CLARK MANAGER 7839 2450 0 10

7788 SCOTT ANALYST 7566 3000 0 20

7839 KING PRESIDENT 5000 0 10

7844 TURNER SALESMAN 7698 1500 0 30

7876 ADAMS CLERK 7788 1100 0 20

7900 JAMES CLERK 7698 950 0 30

7902 FORD ANALYST 7566 3000 0 20

7934 MILLER CLERK 7782 1300 0 10

1234 JOHN MGR 7839 2000 200 50


Exe -11 Display the Details of Employees in Department wise in Separate Output File.

10th Deptno in one Output File, 20th Deptno in one Output File, 30th Deptno in one Output
File, Rest of Department in Send it into Reject File.

Using the following processing Stages get the Output of who are working in the 10th
Department and other department records send into Rejected File

a) Transformer Stage

b) Filter Stage
c) Switch Stage

Input File is Employee File.

Exe-12 Using the Aggregator Stage Calculate maxsal, Minsal, Avgsal, Sumsal by
Department wise and Job wise. (Input File is Employee File)

Exe-13 Display the Unique records (Unique Jobs) in above File by using the following
processing Stages

a) Remove Duplicates Stage


b) Transformer Stage
c) Sort Stage
Exe-14 Calculate the Bonus for Employees by using Esal Column in Employee File.

Bonus is 10%. And daily Salary of the employee

Hint: - Bonus=Esal*0.10 (By Using Data Scrubbing Concept)

DaySal=Esal/30

Exe-15 Generate the Surrogate keys for the Employee file by Using the Stage Variable
using transformer Stage.

Exe-16 Using the Stage Variable Concatenate two String fields for the following Input
file

Input File

Output File

Exe-17 Using the Modify stage performs the following operation for Employee File.

a) Keep
b) Drop
c) Column Name Change (New_Sal=Esal)
d) Datatype Change (Convert into Esal into Char Datatype)
e) Null Handling

Exe-18 Display the first five Records in the Employee File.

Exe-19 Display the last five Records in the Employee File.

Exe-20 Display the 40% Records in the Employee File.

Exe-21 Using the below Files

Input File Seq_1 Input File Seq_2


Develop Jobs using following Processing Stages

a) Change Capture Stage


b) Change Apply Stage

Exe-22 Display the OutPut in target as Output File by Using the Following Input File.

Input File OutPut File

Exe-23 Develop a Job using Column Generator Stage and Row generator Stage

For the below file Generate Sno Column in the Target Output Files,

Using Row Generator Stage Generate the following Fields

Eno, Ename, Ejob, Esal, Dname

Generate up to 15 to 20 Records in Target Output File.


Exe-24 Create the Shared Container for the Exe-11 applies the logic for following
Sequential files.

Exe -25 Create Batch using the Client Director, compile and Run the Batch with no
errors (Hint: Batch = more than 3 Jobs up to N Jobs)

Exe -26 Add the Scheduling the Batch and Job on Specific time and day using the Client
tool Director.
Sequential File
Exe 27 Input file “file1” (Tab Delimited file)

ID Name
1 Arun
2 Balu
3 Ching Chang
4 Rum Tum

a. Copy it to file12 with heading


b. Copy it to file13 without heading
c. Copy it to file14 and change the delimiter to space
d. Copy file14 to file15
e. Try reading file with pattern file1*

Exe 28 file “file2” (fixed length file)

ID Name
1 Arun
2 Balu
3 Chandra

a. Convert it into CSV file. (Comma Separated file)

Exe 29 Input file (single line)

abcdefghijklmnopqrstuvwxyz

Output file format “file41”

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z

Exe 30 Use Aggregator stage,


a. With input value as number, character, date, timestamp
b. Perform operations - sum, average, count, min, max

Exe 31 Use Filter stage to split the input data as specified below,

Input Data – infile15.txt (sequential file, tab delimited)


ID Name
1 A
2 B
3 C
4 D
5 E
6 F
7 G
8 H
100 Y
-1 Z

Output Data (sequential file, tab delimited)

Output File Name Condition


outfile151.txt ID between 1 to 3
outfile152.txt ID < 6
outfile153.txt Rejected records by Filter stage
Exe 32 Use Join stage to join to input file using ID as key column and try following
types of join

a. Left-outer join
b. Right-outer join
c. Full-outer join
d. Inner Join

Input Data (sequential file, tab delimited)


infile161.txt
ID Name
1 Arun
2 Balu
3 Chandru

infile162.txt
ID Dept
2 CSE
3 ECE
4 MECH

Exe 33 Use Lookup stage and above question’s (No. 16) input file and try following
Lookup options for unmatched records,
e. Continue
f. Drop
g. Reject
h. Fail

b. Use one Merge stage and join all the input data.

Input Data (sequential file, tab delimited)


infile181.txt (Master link)
ID Name
1 Arun
2 Balu
3 Chandru

infile182.txt
ID Dept
2 CSE
3 ECE
4 MECH
infile183.txt
ID Sem-1
2 Pass
1 Fail
infile184.txt
ID Sem-2
3 Fail
4 Pass

Output Data (sequential file, tab delimited)


ID Name Dept Sem-1 Sem-2

Exe 34 Find the below Assignment

c. Convert the input data into output data using,


a. PIVOT stage
b. Transformer

Input Data – infile20.txt (sequential file, tab delimited)


Name marks-1 marks-2 marks-3
Arun 10 20 30
Balu 40 50 60

Output Data – outfile20.txt (sequential file, tab delimited)


Name Mark
Arun 10
Arun 20
Arun 30
Balu 40
Balu 50
Balu 60
Exe 35 Find the latest customer Address and detail for the below data.

Input Data – infile23.txt (sequential file, any delimiter of your choice)

Name Address Date


Arun Address1 01-JAN-2010
Balu Address2 01-JAN-2010
Chandru Address3 05-JAN-2010
Balu Address4 10-JAN-2010
Arun Address5 10-JAN-2010
Deepak Address6 11-JAN-2010
Babu Address1 20-JAN-2010
Arun Address7 20-JAN-2010

Output Data – outfile23.txt (sequential file, any delimiter of your choice)

Name Address Date


Arun Address7 20-JAN-2010
Babu Address1 20-JAN-2010
Balu Address4 10-JAN-2010
Chandru Address3 05-JAN-2010
Deepak Address6 11-JAN-2010

You might also like