Forum Discussion

bigdogz's avatar
bigdogz
New Contributor
5 years ago
Solved

SQL Server No Rows Control Flow

Newbie with Snap Logic.
I’m attempting to build an integration that will run once a day.
The input is coming from a SQL Server database.
There will be days when there will be no data to process.
I’m looking for best practices for determining if there is no data and exiting the pipeline graciously.
I have a SQL Server Execute Snap followed by a Mapper Snap. The Pipeline current fails on the Mapper.
Is it best practice to run a “pre-query” to determine if there are any rows to process and use the “Exit” snap to kill the pipeline? This seems wasteful.
Or use a Data Validator Snap? Not sure how to check the row count.
Or is there another pattern I haven’t found yet?
Thanks for you input.

  • ptaylor's avatar
    ptaylor
    6 years ago

    Wow, can’t believe it took me this long to learn of the Pivot snap. 🙂

    Yes, that works nicely for this:

3 Replies

  • Hi @vshalbnsal,

    In the SOAP Execute snap you have the WSDL Url followed by the Service Name, Endpoint, and Operation. Try to fulfill all of them. The last one is the Operation which actually is the method of your SOAP service - in your case, it should have a parameter/argument MessageId (in the code of the service).

    Then you can go down in the snap and find “Customize Envelope”. From there “Generate Template” should generate soap xml and withdraw MessageId. It’s then automatically used by the method, and you should not add/send MessageId somewhere.

    BR, Igor

    • PeterRNLI's avatar
      PeterRNLI
      New Contributor II

      Could you provide an example of that syntax please?