โ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โ)