How can you find the 2nd Highest salary in a file department wise in abinitio?

Answer Posted / murali krishna udayagiri

Yes Vital is correct. This can be acheived using SCAN
component with only one variable.

1.Input_file
2.Sort with in group (dno asc,sal desc)
3.scan
###############################################
type temporary_type=record
integer(4) temp1;end;
temp :: initialize(in) =
begin
temp.temp1::0;
end;

out :: scan(temp, in) =
begin
out.temp1 :: temp.temp1 + 1;
end;

out :: finalize(temp, in) =
begin
out.sal:: in.sal;
out.dno :: in.dno;
out.temp1 :: temp.temp1;
end;
out :: output_select(out) =
begin
out::out.temp1 == 2;
end;
###############################################
4.Output_file

Thanks,
Murali Udayagiri
Mail id: udayagiri.murali@gmail.com

Is This Answer Correct ?    3 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi friends, what are the new features in abinito3.0?

2316


how will i can implement Insert a new record (if not present in Input file),Update the record (if present in input) a csv file in Abinitio

1300


46.How you can create cross joined output using join component ? 47.What is the default layout of watcher files ? How to use in abinitio graph? 48.Why you get 'too many open files' error ? How to use in abinitio graph? 49.What is the significance of vnode folder under AB_WORK_DIR ? How to use in abinitio graph? 50, What is the significance AB_AIR_BRANCH? How to use in abinitio graph? 51. How can you select only unique records from a set of records ? How to use in abinitio graph? 52. How next_in_sequence work in parallel layout ? How to use in abinitio graph? 53. Why you want to set a modest number in limit ? How to use in abinitio graph? 54. How you can encrypt a password and use it in dbc file? How to use in abinitio graph? 55. Which function you should be using if you do not want to process non printable char from a feed file ? How to use in abinitio graph? 56. How you can run a component for certain conditions ? How to use in abinitio graph? 56. What is catalog and when you should use it ? How to use in abinitio graph? 57. How you can use reformat as a router ? How to use in abinitio graph? 58. How many process gets created for a n-way parallel component ? How to use in abinitio graph? 59. Why delimited DMLs take more time to process than fixed length DMLs? How to use in abinitio graph? 60. How can you select only first and last record from a file without using next_in_sequence? How to use in abinitio graph? 61.Why you should always keep largest input as driving input for Join ? How to use in abinitio graph? 62. What a catalog file contains ? How to use in abinitio graph? 63. What Is private project and public project ? How to use in abinitio graph? 64. Why you should not use checkpoint after replicate ? How

5211


Explain the difference between the truncate and delete commands?

613


What would be the next step after collecting the data?

730






difference between paramaters inputparameters,Local parameters, Formal parameters, Sand box parameters,Project parameters and export parameter?

2302


What are the functions of the replicate and dedup component?

624


Do you know what a local lookup is?

656


Can you explain data flow graph with an example?

712


What is the use of aggregation when we have rollup as we know rollup component in abinitio is used to summarize a group of data record? Then where we will use aggregation?

704


What is the function that transfers a string into a decimal?

673


What is MAX CORE of a component?

716


Do you think effective communication is necessary for data processing?

724


What is broadcasting and replicate?

705


Can you explain the co>operating system’s processing model?

609