09-07-2021 09:27 AM
Hi,
I have a pipeline where I need to send two sets of data streams union-ed
However, I need to union them only if Stream #2 has data or otherwise send no data. I tried union and filter snap on snap.in.totalcount > 1 and it works fine when Stream #2 has no data but when Stream #2 has data it only sends data from Stream #2, as totalcount is calculated per row.
Any ideas?
Best,
Rajesh
09-07-2021 11:05 AM
You can use the Gate snap, Filter and JSON Splitter to achieve what you need. I already did this for you in the following pipeline, so you can easily implement the solution into your pipeline:
Union_Condition_2021_09_07.slp (6.5 KB)
Regards,
Bojan
09-13-2021 12:06 PM
Thanks @bojanvelevski. I have implemented a similar thing as a work around, using the JOIN snap. But I was wondering if there was a more straightforward way.