community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More

Stopping Alteryx when data does not properly join

Meteor

Hi all.  If this is in the wrong forum location please redirect me.

 

For my workflow we have several joins and unions from disparate Data sources.  If a particular join does not result in any matching data, I know that someone selected the wrong files and  I want Alteryx to stop and not proceed. 

 

In other words, I do not want to get a final output that has missing data. What tool would I use to Stop Alteryx altogether and warn the user?

Use the Test tool connected to validate the output of the join.

https://help.alteryx.com/current/Test.htm

 

In workflow configuration choose Cancel Running Workflow on Error:

2017-06-06_16-00-39.jpg

Meteor

Hi jdunkerley79

 

 

Thank you but that's not exactly what I need.  It won't show up as an error if there is no data to join.  Alteryx will just continue on and still process.

 

I want Alteryx to STOP everything at a certain workflow step if there is no data to Join.

Moderator
Moderator

As @jdunkerley79 mentioned, the Test tool should work. This article walks through an almost exact scenario: Stop a workflow on a Condition

Sophia Fraticelli
Customer Support Engineer

@Billbisco You may want to give the attached a try. I like to use the message tool. I've turned it into a simple macro so that it should be easy for you to copy it to your workflow with little problem. The attached yxzp has a sample workflow demonstrating the macro plus the macro itself.

 

Capture.PNG

 

The count records macro is included with Alteryx and will return a 0 if there are no records. I use a select tool to change the field name in case your data happens to have a field named count already in it. Then the message tool checks if count=0 and will throw an error and stop the data if it does find an error. In the case where there is no error, I union the count back to the original data and then get rid of the count field that I added. The unioning back to the original dataset and block until done are just safety measure to ensure no data is passed in the case of an error. 

 

Hope that helps!

Labels