2 Replies Latest reply on Feb 20, 2020 6:02 AM by maxilien NOUTCHA

    Router Transformation.

    maxilien NOUTCHA New Member

      Hello Everyone,


                           Please I need help with Router transformation using string operation. My CSV file have a column name 'SHIPPER'. I wan to separate the shippers.  I want to send All federal Shipping to one target, speedy shipping to another and Island Deliver service to another target.


      I need help with the right syntax.


        • 1. Re: Router Transformation.
          Nico Heinze Guru

          In general you have to provide as condition for each output group, similar to the condition you give in the IIF() function. These conditions must evaluate to "true" or "false" (again, like in the IIF() function).


          Furthermore you need one more piece of information.

          If an input record is forwarded to one or more output groups that you have defined, then this input record will be forwarded to all output groups but not to the Default group.

          If none of the conditions for the output groups applies to one input record, then only this record will be forwarded to the Default output group.

          In this respect the Default group behaves slightly differently from those output groups which you define.


          Here's an example based on your question:

          Here I assume that the relevant PowerCenter port is named SHIPPER and that there are the following distinct values defined for SHIPPER: "Federal", "Speedy", "Express", "Fast", "Island", "Continental", "Other".

          Let's further assume that "Speedy", "Express", and "Fast" all are considered as Speeding Shipment.

          And that all spellings may occur in uppercase, lowercase, or mixed-case writing.


          Under these assumptions the three conditions for the output groups might look like this:

          1. Group Federal_Shipping:  Upper( SHIPPER) = 'FEDERAL'
          2. Group Speedy_Shipping: In( Upper( SHIPPER), 'SPEEDY', 'EXPRESS', 'FAST')
          3. Group Island_Shipping: Upper( SHIPPER) = 'ISLAND'


          Does that clarify your question?




          1 of 1 people found this helpful
          • 2. Re: Router Transformation.
            maxilien NOUTCHA New Member

            Hello Nico,


                                Thanks for the help. You explained it very well and it was well understood. The three conditions you mentioned was correct and the transformation parse successfully making the mapping valid. I think this will increase performance.