Posts

Abinitio Interview Question 43

Image
                                                Abinitio Interview Question 43 cust_id, card_type 111,  platinum 111,  gold 111,  silver 222,  ruby 222,  gold 222,  platinum 222,  diamond 333,  iron 333,  copper 333,  gold Find out the customer  who has all 3 - diamond,platinum and gold called premium customer. constant string1  =diamond constant string2  =platinum constant string3  =gold //let string(20)[3]  my_vec=[vector 'diamond','platinum','gold']; type temporary_type= begin decimal("") cnt; string(",") ctypes; end; out::initialize(in)= begin temp.cnt::0; end; out::rollup(temp,in)= begin temp.cnt::if(in.card_type member [vector 'diamond','platinum','gold']) temp.cnt+1 else temp.cnt; temp.ctypes::string_concat(temp.ctypes,in.card_type); end; out::finalize(temp,in)= begin out.cnt::temp.cnt; out.cust_id::in.cust_id; out.card_types::temp.ctypes; end; out::output_select(out)= begin out::if(out.cnt==

Dynamic Subgraph in Abinitio

Image
                                       Dynamic Subgraph in Abinitio => Dynamic Subgraph -> subgraph that can be updated independntly of the parent graph or the graph which uses it -> parent graph maintains a pointer to the dynamic sub graph but the contents of the dynamic sub graph not loaded until parent graph runs graph interface - contract between parent graph and synamic subgraph .mgi Set of Requirements for Dynamic Subgraph: Input parameters, ports, propagation direction for record formats layout attributes phases if it can have more than 1 Step 1. Create .mgi i.e. the graph interface file File-> New -> Graph Interface Graph Interface Editor-> Parameters         Implementation: <path of the dynamic graph .mp file>         Error_group         Log group     <other custom parameters> Ports     < insert as many input /output ports required> Propagation Rules First Port – Second Port Save as lets us Say testdy

Linked Subgraphs in Abinitio

Image
                                                    Linked Subgraphs in Abinitio => Embeded Subgraph         -> its a ongoing simple subgraph which is not existed independet of parent graph      -> used to enhance redability and maintaince of the graph    => Linked  Subgraph    How to Create     -> can be created using embeded sub graph     -> create sub grraph , label it     -> define parameters      -> File -> Save Subgraph "subgraph-name" as ...     -> saved in Components folder of the Sandbox    How to use      -> can be used in multiple graphs -> drag it in parent graph -> configure the parameters -> if any new version getting created then the parent also needs amendment For More Abinitio, AWS, Database content please visit my youTube channel. https://www.youtube.com/@datapundit @datapundit

Micrograph In Abinitio

Image
                                                                   Micrograph In Abinitio Watch my youtube videos for complete understanding on micrograph Micrographs and Transactionability Chapter1, Introduction   a. What are micrographs . a kind of batch graph . it is executed as a single process  . they deployed to create micrograph object .mg file . Normally they are used in service oriented architecture  a) transaction processing b) web services processing . called by RUN MICROGRAPH component b. Why we need micrographs     c. How to Setup Micrographs d. Restrictions on Micrographs    component folding 1. DB components  2. file path name absolute 3. flows and layout - straight flow and serial layput 4. components must be foldable 5. graphs scripts - do not use these start and end scripts 6. no nesting  7. phase break , single phase , no checkpoint 8. run mode - micrograph 9. partion_path , this_par

Abinitio Interview Question 46

Image
                                               Abinitio Interview Question 46 1  Calculate the difference of date in days date_difference_days(date2,date1) date1=(date(YYYY/MM/DD)) '20230521' date2=(date(YYYY/MM/DD)) '20230523' 2 2  Calucate the Month Start Date and Month End date for the given date let (date("YYYYMMDD")) l_date = '20230521'; l_month=date_month(l_date) l_year=date_year(l_date) month_start_date=(date("YYYYMMDD"))string_concat((string(""))decimal_lpad(l_year,4),(string(""))decimal_lpad(l_month,2),"01"); let string(",")[] leap_year_vec=[vector 31,29,31,30,31,30,31,31,30,31,30,31]; let string(",")[] year_vec=[vector 31,28,31,30,31,30,31,31,30,31,30,31]; let decimal("") is_leap_year = if(l_year/4 ==0) 1 else 0; if(is_leap_year) then month_end_date=(date("YYYYMMDD"))string_concat((string(""))decimal_lpad(l_year,4),(string(""))decimal_lpad(l_mo

Abinitio Interview Question 45

Image
                                  Abinitio Interview Question 45 Get the unique values from the input data Input code, country 1, India 2, Mumbai 1, USA 2, Newyork 1,          UK 2, Edinburgh 2, London output code, countries 2, India,Mumbai 2, USA,Newyork 2, UK,Edinburgh,London type temporary_type= record string(",") l_countries; decimal("") cnt; end; temp::initialize(in)= begin temp.l_countries::in.country; temp.cnt::0; end; out::key_change(in1,in2)= begin out::if(in1.code==1); end; out::rollup(temp,in)= begin out.l_countries::if(temp.cnt!=0) string_concat(temp.countries,',',in.country); out.cnt::temp.cnt+1; end; out::finalize(temp,in)= begin out.code::in.code; out.countries::temp.l_countries; end; For More Abinitio, AWS, Database content please visit my youTube channel. https://www.youtube.com/@datapundit @datapundit

Abinitio Interview Question 44

Image
                                                                   Abinitio Interview Question 44 Take the 2 dates and create end date for first and last quarter. (First date of the quarter , Last Date of the quarter) There will be 2 output fields in the output file. DATE1 = 25102022 DATE2 = 24082023 fqdt=25102022 ==> 01102022 lqdt=24082023 ==> 30092023 Yr_part1=2022 = string_Substring(DATE1,5,4); Yr_part2=2023 = string_Substring(DATE2,5,4); let string(",")[int] quarter_dates1=["0101"+Yr_part1,'0104'+Yr_part1,'0107'+Yr_part1,'0110'+Yr_part1]; let string(",")[int] quarter_dates2=["3112"+Yr_part2,'3009'+Yr_part2,'3006'+Yr_part2,'3103'+Yr_part2]; for (i,i<4) begin qstartdt = if((date("DDMMYYYY))quarter_dates1[i]<(date("DDMMYYYY))fqdt) (date("DDMMYYYY))quarter_dates1[i]; qenddt = if((date("DDMMYYYY))quarter_dates2[i]>(date("DDMMYYYY))lqdt) (date(&

Abinitio Interview Question 40

Image
                                                                           Abinitio Interview Question 40 Watch the youtube video seqNo, deptName,citi1, citi2 1, XYZ, Pune, Guwahati 2, ABC, Mumbai, Chennai Output: seqNo,deptName,city 1, XYZ, Pune 1, XYZ, Guwahati 2, ABC, Mumbai 2, ABC, Chennai input.dml record string("\n") str=''; end; input.dml record string("\n") str=''; end; output.dml record string(",") seqNo=''; string(",") deptName=''; string(",") city=''; end; out::length()= begin out::length(string_split(in.str),',') -2; end; out::normalize(in,index)= begin out.seqNo::string_split((in.str),',')[0]; out.deptName::string_split((in.str),',')[1]; out.city::string_split((in.str),',')[index+2]; end; For More Abinitio, AWS, Database content please visit my youTube channel. https://www.youtube.com/@datapundit @datapundit

Abinitio Interview Question 35

Image
  Abinitio Interview Question 35 Input: Col1|Col2 A   | A A   | B B   | C B   | D B   | E Output: Col1,Col2, Seq1,Seq2 A,  A, 1, 1.1 A,  B, 1, 1.2 B,  C, 2, 2.1 B,  D, 2, 2.2 B,  E, 2, 2.3 INPUT--> Replicate -->  ROLLUP on Col1--->assign seq no=Seq1 ----->A,1    B,2  |                  | Inner |                 JOIN  -->  SCAN -->OUTPUT               | | |-----------------------------------------------------> SCAN type temporary_type record string("") sub_seq; decimal("") cnt; end; out::initiaize(in)= begin out.sub_seq=''; out.cnt=1 end; out::scan(temp,in)= begin out.sub_seq::string_concat(in.Seq1,".",(string(""))temp.cnt); out.cnt::temp.cnt+1; end; out::finalize(temp,in)= begin out.Col1::in.Col1; out.Col2::in.Col2; out.Seq1::in.Seq1; out.Seq2::temp.sub_seq; end; For More Abinitio, AWS, Database content plea

Abinitio Interview Question 36

Image
                                                            Abinitio Interview Question 36 EmployeeNo, Prodcut E01, Car E01, Laptop E02, Car Result EmployeeNo | Car_Ind | Laptop_Ind E01 | 1 | 1 E02 | 1 | 0 type temporary_type= begin decimal("") car_ind; decimal("") laptop_ind; end; out::intitialize(in)= begin car_ind::NULL; laptop::NULL; end; out::rollup(temp,in)= begin out.car_ind ::if(in.Product=='Car' or temp.car_ind==1) 1 else temp.car_ind; out.laptop_ind::if(in.Product=='Laptop' or temp.laptop_ind==1) 1 else temp.laptop_ind; end; out::finalize(temp,in)= begin out.Name::in.Filedvalue; out.car_ind::first_defined(temp.car_ind,0); out.laptop_ind::first_defined(temp.laptop_ind,0); end; For More Abinitio, AWS, Database content please visit my youTube channel. https://www.youtube.com/@datapundit @datapundit

Abinitio Interview Question 42

Image
  Abinitio Interview Question   42  Watch my YouTube Video for this as below: Abinitio Interview Question 42 Input 1 Output 1 1,2 1,2,3 1,2,3,4 1,2,3,4,5 input -->  Normalize(length=5)           (normalize) out.val::in.val+index -->   1 2 3 4 5   Scan {} -> type temporary_type= begin string(int) str; decimal("") cnt; end; out::initialize(in)= begin temp.str::''; temp.cnt::0; end;   out::scan(temp,in)= begin temp.str::if(temp.cnt==0)'1' else string_concat(temp.str,",",temp.cnt+1);  temp.cnt::temp.cnt+1; end; out::finalize(temp,in)= begin out.str::temp.str; end; ->output Output 1 1,2 1,2,3 1,2,3,4 1,2,3,4,5 For More Abinitio, AWS, Database content please visit my youTube channel. https://www.youtube.com/@datapundit @datapundit

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;