Posts

Showing posts from March, 2024

Multilevel Normalization for Nested Vector in Abinitio - Volume2:

Image
                              Multilevel Normalization for Nested Vector in Abinitio  Fixed Length Nested Vector string(2)[6][3][2] =      [vector         [vector  vector ['a','b','c','d','e','f'], vector ['g','h','i','j','k','l'], vector ['m','n','o','p','q','r'] ], [vector  vector ['1a','1b','1c','1d','1e','1f'], vector ['1g','1h','1i','1j','1k','1l'], vector ['1m','1n','1o','1p','1q','1r'] ] ];   input-> Normalize level->Normalize level2 --> Normalize level3-> output Read the Data in the following Format: record    record record record string(1) vovel; end [6] level_1; end [3] level2; end [2] level3; end;    Ei

Nested Vectors in Abinitio

Image
                                Nested Vectors in Abinitio                                                                                                      Nested Vectors Fixed Length Nested Vector string(2)[6][3][2] =      [vector         [vector  vector ['a','b','c','d','e','f'], vector ['g','h','i','j','k','l'], vector ['m','n','o','p','q','r'] ], [vector  vector ['1a','1b','1c','1d','1e','1f'], vector ['1g','1h','1i','1j','1k','1l'], vector ['1m','1n','1o','1p','1q','1r'] ] ]; ===============================================             Constructing Nested Vector: Normalization level 1 Normalization Level 2 Normalization Level 3                  

Abinitio Interview Scenario Based Question 38

Image
            Abinitio Interview Scenario Based Question 38            Watch my YouTube Video for this as below:  Solve Using Abinitio  Input DeptID  teacher    IsAssigned D1      Teacher1   1 D1      Teacher2   1 D1      Teacher3   0 D2      Teacher1   0 D2      Teacher2   1 D2   Teacher3   0          DeptID   Teacher1    Teacher2   Teacher3 D1 1 1 0 D2 0 1 0 Input--->Rollup(DeptID)-> Output teporary type= begin decimal("") Teacher1; decimal("") Teacher2; decimal("") Teacher3; end; out::initialize(temp,in)= begin out.Teacher1::0; out.Teacher2::0; out.Teacher3::0; end; out::rollup(temp,in)= begin out.Teacher1::if(in.Teacher=='Teacher1' and in.IsAssigned ==1) 1; out.Teacher2::if(in.Teacher=='Teacher2' and in.IsAssigned ==1) 1; out.Teacher3::if(in.Teacher=='Teacher2' and in.IsAssigned ==1) 1; end; out::finalize(temp,in)= begin out.DeptID::in.DeptID; out.Teacher1::temp.Teacher1; out.Teacher2::temp.Teacher2;

Abinitio Dense Rank - Template Mode SCAN

Image
                                    Abinitio Dense Rank Evaluation by Scan without transform expansion         Watch my yourube video here: 2.  Same as Dense_Rank() function is SQL         INPUT-> SORT (dept, sal desc) -> Scan-> OUTPUT Rank Evaluation by Scan without transform expansion Use SCAN with key deptId. let int _d_ranking_ =0;   // use global variable to track/update the rankings  out::scan(int)= begin //previous() fuction returns NULL for the first record in each group,  //so the assignment is such situations is 1. _d_ranking_=first_defined(if(previous(in.sal)!=in.sal) _d_ranking_+1 else _d_ranking_,1); out.*::in.*; out.dense_rank::_d_ranking_; end; deptId , empId, Sal,            Drank D1,       E1,      890 2 D1,      E2, 750 3 D1,      E9, 750 3 D1,    E3, 895 1 D1,    E11, 740 4 D2,      E4,      800 2 D2,      E5, 900 1 D3,      E8,      500 1 For More Abinitio AWS Database content please visit my yo

Abinitio - Rank Evaluation by Scan without transform expansion

Image
       Rank Evaluation by Scan without transform expansion      1. Same as Rank Function is SQL Use SCAN with key deptId. Input -> sort (dept,sal dec) -> SCAN  ->  Output let int _ranking_ =0;   // use global variable to track/update the count  out::scan(int)= begin //previous() fuction returns NULL for the first record in each group,  //so the assignment is such situations is 1. _ranking_=  first_defined(if(previous(in.sal)!=in.sal) count() else _ranking_,1); out.*::in.*; out.rank::_ranking_; end; For example Input: deptId , empId,      sal  D1,      E1,              890 D1,      E2,      750 D1,      E9,      750 D1,    E3,      895         D1,      E11,            740 D2,      E4,              800 D2,      E5,      900 D3,      E8,              500 Output: deptId , empId, Sal, Rank    Drank D1,      E1,       890 2 2 D1,     E2, 750 3 3 D1,      E9, 750 3 3 D1,    E3, 895 1 1 D1,    E11, 740 5 4 D2,      E4,     

Recursion In Abinitio

Image
                                                    Recursion In Abinitio watch my youtube video as below                                                                          Input as well Lookup labeled as "EmpMgrDtails" having fields as EMPID, MGRID EMPID, MGRID Level topmostmgrid 1007, 1006 4 1006, 1003 3 1003, 1002 2 1002, 1001 1 1001, 1000 0 3007, 3006 5 3006, 3003 4 3003, 3002 3 3002, 3001 2 3001, 1001 1 4008, 4002 2 4002, 4000 0 4003, 4002 2 5009, 5004 4 5004, 4003 3 9900, 9001 2 9001, 9000 1 9000, 8000 0 ========== The Input dataset will be used as input and lookup as well. Input data -> Refromat (lookup) -> Output out:reformat(in)= begin out.empid :: in.EMPID; out.topMgrId :: top_mgrid(in.EMPID,in.MGRID); //Call the top_mgrid recursive function end; //topmgid is a recusive function which returns the ul