IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Calling multiple functional maps

    Posted 03/23/18 07:34 PM

    Originally posted by: Bragger


    Hi,

    I want to call multiple functional maps on a same group in Output. There are 2 input cards - Say Input 1 and Input 2 both of which are repeating 0:s times.

    There is a group in Output say Group_Output which is repeating 10 times. Now I want to call functional map from Input 1 and only when all 10 spots are not filled from Input 1 then call functional map from Input 2. Else if all 10 spots are filled from Input 1 then do-not take data from Input 2.

    Please note - I have to implement some other complex logic inside when I call functional map from Input 1 before mapping the field in Output. It is not straight map and hence it's not possible to use EITHER function upfront. Because in that case I will have to write condition on what basis it should go to functional map 2. Even if I write Either function but I am not sure how to determine on run time itself that how many spots are filled from functional map 1.

    Do I need to make use of partition group here? Will that help. Can someone share example on how to use Partition group in that case?

    I have a restriction here that I can-not call another map using RUN function due to some other system issues.


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 2.  Re: Calling multiple functional maps

    Posted 03/26/18 04:38 AM
      |   view attached

    Originally posted by: PaulBrett


    Something like this?

    Input1:

    One
    Two
    Three
    Four
    Five
    Six
    Seven
    

    Input2:

    Blue
    

    Output:

    One
    Two
    Three
    Four
    Five
    Six
    Seven
    Blue
    Blue
    Blue
    

    Thank you.

    Paul

    Follow me on Twitter


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender

    Attachment(s)

    zip
    Example.zip   2 KB 1 version


  • 3.  Re: Calling multiple functional maps

    Posted 03/26/18 12:59 PM

    Originally posted by: Bragger


    Nope. Let me give me an example.

    Let's say Input 1 has total 14 fields. Input 2 has 12 fields. Now there is some logic which I am using to filter out the fields present in Input 1 and Input 2.

    First Scenario - Let's assume after applying the filter condition, only 7 fields were mapped from Input 1 out of 14. In this scenario since we still have 3 spots left in Output  (Output can accommodate total 10 fields) and hence we will take 3 fields from Input 2 (which matches the filter criteria).

    Second Scenario - Let's assume after applying the filter condition, 10 fields were mapped from Input 1 out of 14. In this scenario since we have consumed all 10 spots in Output  (Output can accommodate total 10 fields) and hence we don't need to take any field from Input 2.

     

     


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: Calling multiple functional maps

    Posted 03/26/18 01:11 PM

    Originally posted by: PaulBrett


    I should think that you could use the techniques in my example to accomplish what you want.  Maybe you need to build a temporary output calling only functional map 1, and then do a COUNT() to see what slot you have left, then build a temporary data structure using the appropriate number of calls to functional map 2, then finally concatenate the two lumps.

    If not, perhaps you could provide : Input, Input Typetrees and an example of your output expectations for various input scenarios.

    Thank you.

    Paul

    Follow me on Twitter


    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: Calling multiple functional maps

    Posted 03/26/18 02:01 PM

    Originally posted by: Bragger


    Understood. This is what I was thinking earlier but how do I concatenate the 2 lumps together into 1 group.

    So I will have 1 temporary output card which will have 2 groups.

    Group1(s) - F_Func_1(Records from Input 1)

    Group2(s) - If Count of Group 1 is less than 10 then F_Func_2(Records from Input 2) Else NONE

    Now in my main Output Card how do I combine Group1(s) and Group2(s) from temporary Output card?


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 6.  Re: Calling multiple functional maps

    Posted 04/03/18 04:23 AM
      |   view attached

    Originally posted by: PaulBrett


    Perhaps it is the PARSE() function you need to review.  As long as the complete data structure will 'cast' into the new structure, you should be good.

    Thank you.

    Paul

    Follow me on Twitter


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender

    Attachment(s)

    zip
    Parse.zip   2 KB 1 version