Forum Discussion
Rather than returning a dummy record, you could also check the returned document equal to an empty object. For example:
$ == {}
This can be your Router check condition if no data was returned by the select since if anything was returned, it would not be an empty object.
Quick question about the first two snaps in my pipeline (Oracle Execution and the mapper snap), if there is more than one row of results in the ‘Select’ query, how does snapLogic decide which value to assign to ‘AUDIT_COUNT’ in the mapper snap? Because my comparison in the ‘Is there data’ router looks to see what the value is… if it’s not zero, it executes the upper pipeline; if it’s zero, it executes the lower pipeline. So far it’s working, but I’m not sure if it’s because it just takes ‘AUDIT_COUNT’ from the first row of results, which will either be zero if the dummy record is the only row, or something other than zero if there are any other rows (ex: AUDIT_COUNT is 2 or 5 etc).