Skip to main content

Posts

Featured Post

Ranking in Abinitio

/*scan for rank number calculation /*scan for rank number calculation type temporary_type = record decimal("|") i; end /* Temporary variable*/; temp::initialize(in) = begin temp.i :: 0; end; --------------------------------- let string(",")[] vec =reinterpret_as(string(1)[],in.data); ---------------------------------------------------------------------- out::scan(temp, in) = begin out.i :: temp.i + 1; end; out::finalize(temp, in) = begin out.* :: in.*; out.rank_nbr :: temp.i; end; out :: output_select(out) = begin out :: out.rank_nbr == 1; end; ---------------------------------------- type temporary_type = record decimal("|") i; end /* Temporary variable*/; temp::initialize(in) = begin   temp.i :: 0; end; --------------------------------- let string(",")[] vectors =reinterpret_as(string(1)[],in.data); ---------------------------------------------------------------------- out::scan(temp, in) = begin   out.i :: temp.i + ...
Recent posts

SYNTEL INTERVIEW

3 Rounds Of Interview-->(1) Technical (2) Managerial (3) HR TECHNICAL ------------------- (A) SQL: (i) Query to find out 2nd highest salary (ii) 2 tables     Name| Sub |Marks       a     |B  |10       a     |C  |20       b     |B  |10       b     |C  |30       c     |B  |10       c     |C  |30 Query to to display all the records of a student where the  subject= C and its marks=30  alone (iii) Finding Top 10 values in a table UNIX (i) Cut command (ii) Need to display only the 2nd and 5th column data;delimiter is comma(,) (iii) Need to display records between 50 till 120 (iv) grep -i -v ? (v) How to check if a file is empty or not>? (vi) How to check whether the 3 parameters is passed or not?(Soln $# -eq 3) (vii) ls -ltr --...

TERADATA - RANK FUNCTION

Rank():          This function will assign the rank number to each record present in a partition.          If the function in SQL encounters two equal values in the same partition,          it will assign the same rank number to both values and skips the next number          in the ranking for successive partitions.           Dense_rank():          This function assigns rank number  similar to the above function ,          but the ranks are consecutive for successive partitions . No ranks are skipped          if there are ranks with multiple items.           ...

UNIX - AIR COMMANDS

air object changed: Compares two branches or versions of a single technical repository or two repositories, and identifies which objects have changed.    The command outputs the list of files that have been added, removed, or changed between the source and target as follows: Code (meaning) Description A  (Added) The file exists in the target but not in the source. R  (Removed) The file exists in the source but not in the target. M  (Modified) The file is different in the source and the target. S  (Same) The file is the same in the source and the target. U  (Unknown) The difference could not be determined. Occurs due to permission errors or when an object cannot be checked out. N  (No object) The specified object does not exist in either the source or the target. air tag diff: ...

AB INITIO - LOOKUP FUNCTION

                                                LOOKUP FUNCTION   lookup_next() §   Lookup_next will give you the next available match in the Lookup file. §   Lookup_next should be Preceded after successful call to lookup, lookup_count, lookup_match, lookup_nth, lookup_range, or lookup_next itself. §   The lookup_next function returns NULL if you call it more times than the number of matching records in the file, or if the next matching record does not exist. §   Behavior of lookup_next() on different calls                   The next successive matching record after the previous call to lookup or lookup_range .  ...

TERADATA-PIVOT FUNCTION

                                  PIVOT FUNCTION §   Splits records by data fields (Columns) §   Converts Rows to Columns or Columns to Rows §   Converts an input records into multiple output records.                                                                      EXA MPLE Execute the below query for the results. §   Before pivot query:             sel cost_cntr_id , DATASET_NBR , cat , r...