Union when no data is available
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I need the union tool to work when one of the sources does not contain data. This is a common problem and the generic add in a count tool does not work in this case as there is nothing to count (no nulls). The sources are dynamic selections used in an app, if nothing is selected I still want the app to complete the export. All I can think of is to add dummy data into the app like a selection of "no selection" but I would rather not to keep it clean and intuitive for the user. Alternatively, closing off the selection entirely within the container still does not work as it generates the same problem. Is there a true method to allow the union tool work this way or add in dummy data after the selection is made; i.e. in a stream where there is no data?
Cheers,
Jack
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @jstewart
If the container is set to close (i,e value passed to action tool is false) it will collapse the whole container and will be inactive and be not considered. So union tool should work without dummy data too while running an app the option is selected to collapse the container.
Additionally you give a look at condition tool which might help you in passing T or F https://help.alteryx.com/current/designer/condition-tool
Hope this helps🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, @jstewart
Please like or mark as an acceptable solution if this works for you.
The count tool will count a no-records set as zero.
With regards to dummy data, check out the below and see if it works for you.
Add it into your stream where it makes sense, and I believe that the union should work (it's brute force, but it's quick and keeps the mess away from your users IMHO).
Workflow plug attached for your convenience. Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Adding my comments as I am also looking for a solution for the same problem and others may come across this too.
Thanks for the suggestions - unfortunatley they don't work if there is no data coming from the input tool.
Add a count tool: unfortunately there is nothing to count and there is no output in this case.
Create dummy data and union: there nothing to union to. I can create the dummy data with no problem, but the union tool will not work.
I can see only two solutions at the moment:
1) Bring additional, unwanted data in through the input tool, then filter it out in the workflow. Even if there is nothing left after the filters are applied,the metadata will remain and the errors will resolve. Obvs this is very inefficient, but straightforward.
2) Disable containers if there are no rows as suggested above. I know this works as we a macro that utilises this - off to Google now...
EDIT: Union WILL work but only if you check the non blocking metainfo option under Manually Configured (whoop whoop!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
"EDIT: Union WILL work but only if you check the non blocking metainfo option under Manually Configured (whoop whoop!)"
From the bottom of my heart... thank you. Banged my head against the wall for far to long.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@trzeciakwojtek I think that might be my first "Solution" 😊
Please do mark as solved so that I can get the bragging rights 😂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I don't think I can mark it as solved as it's not my thread.
But here's the best I can do!
