Topic
  • 6 replies
  • Latest Post - ‏2013-07-04T06:05:21Z by Sidhumohan
Sidhumohan
Sidhumohan
34 Posts

Pinned topic Skipping output cards based on a condition

‏2013-07-01T07:13:37Z |

Hi All,

 

Is it possible to skip a particular ard or a number of cards based on some condition.

I have 5 output cards and one condition is success means need to go through all the maps and other wise need to go to th final card. Cannnot use RUN function becuase the file size is huge.

 

Regards,

Sidhu

  • pavan_Vi
    pavan_Vi
    4 Posts

    Re: Skipping output cards based on a condition

    ‏2013-07-01T09:44:12Z  

    My solution may be secondary solution in terms of performance.

    1. Assumeing You have 5 output cards and you logic present in each out card.

    2. I suggest to wrie/create a f_map for each card and implement same logic there.

    3. Your condition will be in main map output cards. Based on outcard condition you can call required F_map.

    hope some body will give better solution than above. me too looking :-)

     

  • Sidhumohan
    Sidhumohan
    34 Posts

    Re: Skipping output cards based on a condition

    ‏2013-07-01T10:01:37Z  
    • pavan_Vi
    • ‏2013-07-01T09:44:12Z

    My solution may be secondary solution in terms of performance.

    1. Assumeing You have 5 output cards and you logic present in each out card.

    2. I suggest to wrie/create a f_map for each card and implement same logic there.

    3. Your condition will be in main map output cards. Based on outcard condition you can call required F_map.

    hope some body will give better solution than above. me too looking :-)

     

    Thanks for the reply :) Perfomance is the issue with this implementation.

    I need to skip the checks in all the cards and need to skip the cards if the number of records is more than a particular limit.

    Any type tree level check also acceptable for this change but setting the limit is not possible in type tree level because the map should not process the file and should not fail also becuase i need to send a response to another technology.

    Regards

    Sidhu 

  • gopiTX
    gopiTX
    8 Posts

    Re: Skipping output cards based on a condition

    ‏2013-07-01T11:49:32Z  

    Thanks for the reply :) Perfomance is the issue with this implementation.

    I need to skip the checks in all the cards and need to skip the cards if the number of records is more than a particular limit.

    Any type tree level check also acceptable for this change but setting the limit is not possible in type tree level because the map should not process the file and should not fail also becuase i need to send a response to another technology.

    Regards

    Sidhu 

     

    Add one more filed to the each card to store the value of each cards status and based on the status of the previous card you can execute the other cards conditions.

    For example:

     Card 1 : Filed1: Condition = success 

      Write below logic to set the status.            

    Status filed = If Filed1: Condition = "success" Set status to success other wise set to "fail"

     

    In Card 2 check the status of Card 1. that is success or fail.

                      If the status of the card1 is success then execute the card 2 conditions. if status is fail map to none. So that card 2 will not execute and got to the next card i.e card 3.In card 3 ,4 and 5 implement the same logic.

     

    I hope this will help you.

    Regards

    Gopi

  • Sidhumohan
    Sidhumohan
    34 Posts

    Re: Skipping output cards based on a condition

    ‏2013-07-01T12:15:37Z  
    • gopiTX
    • ‏2013-07-01T11:49:32Z

     

    Add one more filed to the each card to store the value of each cards status and based on the status of the previous card you can execute the other cards conditions.

    For example:

     Card 1 : Filed1: Condition = success 

      Write below logic to set the status.            

    Status filed = If Filed1: Condition = "success" Set status to success other wise set to "fail"

     

    In Card 2 check the status of Card 1. that is success or fail.

                      If the status of the card1 is success then execute the card 2 conditions. if status is fail map to none. So that card 2 will not execute and got to the next card i.e card 3.In card 3 ,4 and 5 implement the same logic.

     

    I hope this will help you.

    Regards

    Gopi

    But how can i set the card status to not execute anything.

    Say in one card i have 4 functional maps written over four groups then i need to check the same conditon over all the functonal maps. Instead of that how can i do that at card level.

     

    say if the number of records are more than thousand i need to skip 4 cards, then take the count of the records and check its greter than 1000 and make the condition as FAIL. and how can i check the FAIL condition at one place in card level. Because i have 10 groups which is having a functional map then i need to check the fail condition at all the levels of functonal map and i have so many fields like that to modify. So it is possible to do at card level

    Any help is much appreciated.

    Updated on 2013-07-01T12:16:58Z at 2013-07-01T12:16:58Z by Sidhumohan
  • gopiTX
    gopiTX
    8 Posts

    Re: Skipping output cards based on a condition

    ‏2013-07-02T14:08:22Z  

    But how can i set the card status to not execute anything.

    Say in one card i have 4 functional maps written over four groups then i need to check the same conditon over all the functonal maps. Instead of that how can i do that at card level.

     

    say if the number of records are more than thousand i need to skip 4 cards, then take the count of the records and check its greter than 1000 and make the condition as FAIL. and how can i check the FAIL condition at one place in card level. Because i have 10 groups which is having a functional map then i need to check the fail condition at all the levels of functonal map and i have so many fields like that to modify. So it is possible to do at card level

    Any help is much appreciated.

    Hi Sindhu,

    I am not sure abt this logic if it is too complex.However you can collect the status of the each functional map by using below rules.

    1.IF(Size(Functional output filed)>0,"success","Fail".))

    2.As in your case you are dealing with numbers of records you can write a rule like below.

    Card 1: Filed 1: IF(Count(Functional map>1000),"Need to skip the cards 2,3,4","Execute next card")

    In card 2: Filed 1:If(Find(Need to skip the cards 2,3,4),"Fail",success)

                      Filed 2: If(Filed1=Fail,"Fail",Execute Logic)(here Filed 1 = Fail status will be still fail.and go to the next filed.If Filed 1=success    actual logic will execute here.

                      Status: IF(Find(Filed2,Fail),"Fail","success")(Here anything other the "Fail", status will set to success.So you can you use this status to execute or not to execute the next card.)

     

    Regards

    Gopi

                      

     

     

  • Sidhumohan
    Sidhumohan
    34 Posts

    Re: Skipping output cards based on a condition

    ‏2013-07-04T06:05:21Z  
    • gopiTX
    • ‏2013-07-02T14:08:22Z

    Hi Sindhu,

    I am not sure abt this logic if it is too complex.However you can collect the status of the each functional map by using below rules.

    1.IF(Size(Functional output filed)>0,"success","Fail".))

    2.As in your case you are dealing with numbers of records you can write a rule like below.

    Card 1: Filed 1: IF(Count(Functional map>1000),"Need to skip the cards 2,3,4","Execute next card")

    In card 2: Filed 1:If(Find(Need to skip the cards 2,3,4),"Fail",success)

                      Filed 2: If(Filed1=Fail,"Fail",Execute Logic)(here Filed 1 = Fail status will be still fail.and go to the next filed.If Filed 1=success    actual logic will execute here.

                      Status: IF(Find(Filed2,Fail),"Fail","success")(Here anything other the "Fail", status will set to success.So you can you use this status to execute or not to execute the next card.)

     

    Regards

    Gopi

                      

     

     

    Hi Gopi,

    Thanks for the reply :)

    This is basically checking the count of the recods and set a status and check the status before in all the other cards.

    But the problem comes in other cards. I dont have functional maps in all other cards. so if i want t check the status success  or failure i need to make it as a functional map and check this condition before calling the functional map.

     

    Attached is the sampe of 3 cards and you can see the fields inside that. So where i will do the check for not executing th card. And complexity doesnt matter but Perfomance matters.

    Attachments