โ08-03-2022 02:55 AM
I am trying to figure out how to route to a โno dataโ path when nothing is returned from my select query. Can someone help me out?
What Iโve tried is (in โIs there data?โ snap): $retval != null (then go to data path); otherwise, go to nodata path. But Iโm guessing since the select didnโt return anything, there is no $retval to look at (catch22).
I also tried:
โ08-03-2022 10:46 AM
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).
โ08-03-2022 11:29 AM
But will the $ = {} work if my router snap has a mapper snap and pipeline execution snap in between it and the Oracle Execute?
โ08-03-2022 11:38 AM
Ok, so I changed the pipeline to compare $ = {} but itโs not working for me.
โ08-03-2022 11:41 AM
Sorry, this is what I changed it to which would be the correct logic for my case:
โ08-03-2022 11:44 AM
But the main thing Iโd like to know is how does snapLogic decide behind the scenes how to populate AUDIT_COUNT with the pipeline I pasted above? Does it use the count from the first row in the returned rows or what does it do?