12-13-2022 02:16 PM
Hi,
I am trying to design a pipeline where it initially will pull in a query result set. I am trying to create a route that identifies whether the query result set returned records or did not return records. Any idea on how to design this pipeline?
12-14-2022 07:17 AM
Hi @TWCMG,
Welcome to the community. You can add a “mapper” snap after fetching your query result with the following expression:
After the mapper snap, have a “router” snap with the conditions:
NOTE: You can put any name instead of $UpdatedRecords, it could be $xyz / $counts / etc.
12-14-2022 07:58 AM
I think when you execute a query and you don’t have any results, you will get an empty object on the output, or just the original object if the Execute snap has an input.
In this case, you can check for a specific field that you know that exists in the result set.
Example: $.hasPath(‘timestamp’)