Chitika

Showing posts with label Scenarios. Show all posts
Showing posts with label Scenarios. Show all posts

Monday, 2 April 2012

Scenario13

source has 2 fields like

COMPANY             LOCATION
IBM                  HYD
TCS                  BAN
IBM                  CHE
HCL                  HYD
TCS                  CHE
IBM                  BAN
HCL                  BAN
HCL                  CHE

LIKE THIS.......

THEN THE OUTPUT LOOKS LIKE THIS....

Company loc count

TCS  HYD  3
         BAN
         CHE
IBM  HYD  3
         BAN
         CHE
HCL  HYD  3
         BAN
         CHE

Tuesday, 28 February 2012

Scenario12

There are 5 columns in a flat file, How to read 2nd and 5th columns only..

Scenario11

Difference between Trim, Trim B, Trim L, Trim T, Trim F, Trim Leading Trailing, Strip White Spaces..

Scenario10

How to abort the job after 50 rows are processed (assume there are 500 records available in a flat file)..

Scenario9

How many ways are there to perform remove duplicates function with out using Remove duplicate stage..

Saturday, 25 February 2012

Scenario8

How to find out First sal, Last sal in each dept with out using aggrigater stage

Scenario7

How to calculate Sum(sal), Avg(sal), Min(sal), Max(sal) with out using Aggrigator stage..

Scenario6

Input is like this:
file1
1
2
3
4
5
6
7
8
9
10

Output is like:
file2(odd)         file3(even)
1                      2   
3                      4
5                      6
7                      8
9                      10

Scenario5

Input is like this:
file1
10
20
10
10
20
30

Output is like:
file2               file3
10                  30
20 

Friday, 17 February 2012

Scenario4

Input is like:
file1
10
20
10
10
20
30

Output is like Multiple occurrences in one file and single occurrences in one file:
file2      file3
10         30
10
10
20
20

Scenario3

Input is like this:
file1
10
20
10
10
20
30

Output is like:
file2               file3(duplicates)
10                  10  
20                  10
30                  20 

Scenario2


input is like this:
no,char
1,a
2,b
3,a
4,b
5,a
6,a
7,b
8,a



But the output is in this form  with row numbering of Duplicate occurence


output:

no,char,Count
"1","a","1"
"6","a","2"
"5","a","3"
"8","a","4"
"3","a","5"
"2","b","1"
"7","b","2"
"4","b","3"

Thursday, 16 February 2012

Scenario1


Input is like this :
i/p
col1,col2
101,a
102,b
103,c
104,d

Output need to be:
o/p
col1,col2
101,d
102,c
103,b
104,a