2 Replies Latest reply on Sep 10, 2019 2:46 AM by Ramta Batra

    read data from csv after a particular row value

    Ramta Batra Active Member

      Hi Experts,

       

      I have a requirement to read data from csv after a particular value in a column.

       

      e.g file has 3 columns (A,B,C) and Informatica should read data after col A has value = 'xyz' in whichever row.

       

      Is it possible in Informatica, please suggest the solution.

       

      Thanks !!

        • 1. Re: read data from csv after a particular row value
          Nico Heinze Guru

          Yes, but there's nothing like a "source filter condition where reading starts". You have to build this yourself.

           

          Read the data from the CSV file as usual.

          Insert an Expression transformation with a variable port named "v_trigger_value_found" of type Integer and set it to the following term (assuming that the the column in question is indeed named A):

              IIF( A = 'xyz', TRUE, v_trigger_value_found)

          Next set up an output port "Forward_Data" of type Integer with this expression:

              v_trigger_value_found

          Now forward all data from the source plus this port Forward_Data into a Filter transformation with the following expression:

              Forward_Data

          The Filter will let pass through only records which follow the first record with column A = 'xyz'.

           

          At least that's how I would implement it in PowerCenter. As far as I know, you can use the same principle in mapping tasks which you build yourself in ICS and IICS.

           

          Regards,

          Nico

          1 of 1 people found this helpful
          • 2. Re: read data from csv after a particular row value
            Ramta Batra Active Member

            Thanks Nico for the quick response !!