05-04-2021 02:18 PM
Here is what I have $message.contains(‘successful’) ? 1 : 0 . This should give me a count of “1” if the Stored Procedure executing correctly. I then have a UNION, AGGREGATE and a ROUTER to count the SQL EXEC snaps, however it is only counting the first one and not the rest. At the end I have an email if $cnt == 10 then Success email, if $cnt < 10 then Failure email. Since the counts are not happening the emails are not generating. Any help is appreciated.
05-04-2021 02:50 PM
Please share your pipeline so it is easier to understand where the issue is.
05-04-2021 02:58 PM
Here is what I have, In the mapper(s) I have:
The Union then
The aggregate:
The router:
The email section:
05-04-2021 03:12 PM
what I would suggest is the capture the documents right before feeding to Aggregate snap, that should give you an idea what might be wrong. Please share the json doc (from Union output view) if you need more assistane.
You can either do validate to obtain it, in case there is any issues. You can do JSON formatter and File Writer to capture for debugging purposes.
05-04-2021 03:17 PM
The thing is I had it working where the .contains it was doing the count of “1”. Then the Aggregate snap would do the counts 1,1,1… Then the router would have the cnt == 10 it would send the Success Email, if the cnt < 10 It would send the Failure email. Right now from the SQL Execute Snap I am not getting a count when it runs. I was before and now I am not.