Data360 Analyze

 View Only
  • 1.  How to force the node to return successfully

    Posted 06-16-2021 06:44

    Hi, 

    In my transform node in the ProcessRecords script I am processing some data and once a certain condition occurs i don't want to carry on processing and want to exit the node successfully without having to process all the remaining records. Is there a way to tell the node to exit succesfully?

    I tried  node.pass() as aware of the node.fail() function but it didn't work.

    thanks

    Scott 

     

    thanks

    Scott 



  • 2.  RE: How to force the node to return successfully

    Employee
    Posted 06-16-2021 07:46

    There is no in-built mechanism to tell the node to skip the processing of all remaining input records without getting the node to fail. 

    However, you can wrap your main logic in the ProcessRecords script in an if statement and use a variable as a flag to indicate whether the main logic is to be executed:

    Note that the node will continue to process (i.e. read) the input records after the stop condition is met, but no output will be generated.

     

    Attached files

    Stop_Processing_On_Condition - 16 Jun 2021.lna

     



  • 3.  RE: How to force the node to return successfully

    Posted 06-16-2021 08:31

    Yep thanks, will stick with that approach, was just wondering if any way to exit without having to run that code for all remaining records to be processed once _stopCondition = True.