Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Stop workflow when Join tool has mismatched value shown in L and R anchor

Lien_Dao
6 - Meteoroid

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 

7 REPLIES 7
alexnajm
17 - Castor
17 - Castor

Have you looked at the Message Tool (alteryx.com)? This has a file output option!

alexnajm
17 - Castor
17 - Castor

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

Lien_Dao
6 - Meteoroid

When I chose Message Type = File Output (Path|Description) and specified the shared folder path|error description under Message Expression, I do not see the output of the Union written as output file in the path I specified. Please refer to attached sample workflow for illustration. 

alexnajm
17 - Castor
17 - Castor

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

Lien_Dao
6 - Meteoroid

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. 

alexnajm
17 - Castor
17 - Castor

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!

Lien_Dao
6 - Meteoroid

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:

  1. Join data from 2 input files
  2. 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).
  3. 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! 

 

 

Labels
Top Solution Authors