Forum Discussion

TAM's avatar
TAM
New Contributor
5 years ago

Having issue with .contains

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.

14 Replies

  • aleung's avatar
    aleung
    Contributor III

    Please share your pipeline so it is easier to understand where the issue is.

    • TAM's avatar
      TAM
      New Contributor

      Here is what I have, In the mapper(s) I have:


      The Union then

      The aggregate:

      The router:

      The email section:

      • aleung's avatar
        aleung
        Contributor III

        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.

  • TAM's avatar
    TAM
    New Contributor

    Sorry, email is just the PASS or FAIL from the count. There is not two separate routers at the end.

  • TAM's avatar
    TAM
    New Contributor

    Should I only have Execute here:

    • aleung's avatar
      aleung
      Contributor III

      You do want have Validate & Execute on any snap you want it to run during Validate

      • TAM's avatar
        TAM
        New Contributor

        Now you have all of my pipeline and how it is running, any thing here that looks wrong?

  • TAM's avatar
    TAM
    New Contributor

    Last thing this is the UNION at the Beginning, it is set up like an SSIS package. Fist two are before the Union so they start first and then the other 9 go after.