Question

Count of total records in previous stage

  • 6 March 2023
  • 4 replies
  • 141 views

Hi Team

 

Can someone please help me how to get count from previous stage.

Ex: My HTTP client gives 1000 records, streamslector filters x records. How do I get value of (1000-x) in groovy evaluator. sdc.records.size() function is giving only batch size. I require total size of (1000-x) of all batches together.

Please help me achieve this in groovy evaluator


4 replies

Userlevel 5
Badge +1

@Priyanka Mynepally 

If you have 1000 records  from the source and filtered out 10 records using stream selector and you are expecting 990 records in groovy processor.

Please confirm on it.

 

No I dont know x value, I know only 1000 comming from source

No I dont know x value, I know only 1000 comming from source

Please help me with solution

Userlevel 5
Badge +1

@Priyanka Mynepally 

 

Please find attached the pipeline for your reference.

I tried to prepare the solution as per your use case , kindly check and let me know if it helps in your issues.

If there are any changed need please let me know then will try to help you on it.

 

Thanks & Regards

Bikram_

Reply