5 Replies Latest reply: Jul 16, 2013 3:41 AM by DecaXD RSS

    Complex CSV with multiple occurence to DB table

    Anindya Gayen

      Hi

       

      I have the following data that i need to write in target DB. When i am trying to do the mapping CSV reads the whole data as the record separator is , and field separator is (blank). When dept 2 it needs to read how it will read, and also the target is two tables as per the criteria. How to handle this?

       

      DEPT,1,ABC,HORIZONTAL SOLUTION

      EMP,123456,RS,SR

      EMP,456789,NP,SR

      EMP,789456,AD,SR

      DEPT,2,DEF,BANKING SECTOR

      EMP,123456,RD,SR

      EMP,456789,PD,SR

      EMP,789456,SM,SR

       

      having the tables in target DB as

      Dept table columns

      deptno PK

      dname

      desc

       

      Emp table columns

      empno PK

      empname

      designation

      deptno FK