3 Replies Latest reply on Jun 20, 2018 5:30 AM by Nico Heinze

    Informatica scenario based question asked in an Interview

    mini mishra Seasoned Veteran

      Hi Frnds,


      Yesterday, I had attended TCS interview in which they asked me one scenario based question. Question was:


      I have a file which contains 2 columns like below:


      col1   col2

      1         A

      2         Z

      3         K

      15       PG

      49       KMC




      many records like this and we don't know how many records are there and at what point they are ending.


      We just know that 1st column is Integer number and second is string.


      Our requirement is to repeat the second column (ie., string value) as many times as mentioned in column 1.


      Which means our result should be like this:


      col1  col2

      1        A

      2        ZZ

      3        KKK

      15      PGPGPGPG.......15 times

      49      KMCKMCKMC.......49 times


      Can anyone help me how can I achieve this result??


      Any feedback is appreciated.