Stop workflow when Join tool has mismatched value shown in L and R anchor
- 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
Hi All,
I have a workflow where a portion of it consists of joining data from 2 input sources through Join tool. I would like to stop the overall workflow when there is mismatched data in the L and R output anchors of this Join tool, and also need to union the L and R data and print that out as output for investigation and resolve the mismatched data by fixing the input, so I can rerun my workflow to produce final output. I have read through some posts on using Test tool that flags out fail when mismatched record count >0, and also on setting Runtime configuration to Cancel Running Workflow on Error, however, I'm unsure about the printing output requirement part. Appreciate if you could help me with this. Thank you!
Cheers,
Lien
Solved! Go to Solution.
- Labels:
- Questions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Have you looked at the Message Tool (alteryx.com)? This has a file output option!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can set up the Message tool similarly by setting up the condition (before rows where expression is true, in this case record count > 0), and selecting the file output option so it writes out to your file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Note the help documentation for this tool - the file path option needs a specification and an output to reference: Message Tool (alteryx.com)
If you just want it to error, you can have the message type be an "Error" instead and have the workflow runtime options stop running upon error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Alex, I finally understand the File Output option for Message tool, it basically makes the message become a hyperlink which if you click on will bring u to the output file whose path you have indicated. As I'm running the workflow through Alteryx app installed to my local computer, I can see that message shown in my designer result window and click on it to bring me to the output file which is what I want, but I wonder how it will appear to my colleagues who run this workflow through Gallery once it has been moved to PROD? Pardon me for this seem-to-be-very-trivial question, as I'm still working through building my very first Alteryx workflow and learning through every big and small hurdles I face.
On the error setting, if I set it as error and choose run time setting to stop workflow when error occurs, it will stop the output file from being written out as well, which won't be helpful for my workflow user who will need to know the "breaks" in 2 sources of data they try to reconcile through this workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can have the output show on Server, although I am not sure it's going to show if you forcibly error out the workflow so I'd be mindful of this
It will not stop the output file from being written out if the writing happens before the erroring, so you can control this with a Block Until Done possibly!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Alex and all
Thank you for sharing many solutions for my question, I really appreciate all your advices and have learnt a lot from them. After considering all the possible tools, I've decided to use a combination of Block Until Done, Filter, Test and Output tools, and designed my workflow as below:
- Join data from 2 input files
- Check mismatched data after joining, if there is any, write output file named "Mismatched output" showing all mismatched data into a shared drive location, then stop workflow with error "Unmatched data" (not sure if end-user will see this error message in Server though, but once they see Mismatched output file generated in their folder, they will know there is mismatched data for their investigation and resolve before rerun the workflow to get the final matched output).
- If there is no mismatched data, workflow continues, all joined data will be written to another output file named "Final matched output" and saved in a shared drive location. The output for step 2 will not be generated.
Sharing the revised workflow as attached, I crossed out the output file path for sensitive data. Was trying out Control Container but unable to use it correctly to obtain the desired workflow above so I settled with Block until done.
As I'm very new to this, there are some challenges for me when working on this use case: 1) Uncertainty on what will be visible to the end user of the workflow when it goes to server, for example Test tool was suggested by several people which I understand is very easy to use when we (Alteryx developer) can see it flagged out error in Designer's Result window, but I'm not sure if the end user will see the same error message when they run the workflow on Prod through Gallery 2) Limited knowledge in the advanced tools like Interface tools (Error Message tool). So for now, I've settled with all the basic tools that I'm familiar with knowing there might be better ways to design this, but with more practice and this strong support system from our wonderful Alteryx community, I will surely be there one day :). Thanks all!
