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.

Skip output file if there are no records

AshBlue20
5 - Atom

Hi. Is there a way to skip/disable an output file if there are no records?

 

One of the output files of my workflow is an error report after a set of joins. Anything not joined goes to the error report. I want the workflow to only output the files with the joined records if the non-joined record count = 0. One less .xlsx to open and review would save me a significant amount of time for a series of workflows that run on schedule and drop files into my email inbox on Monday morning.

 

Thank you!

3 REPLIES 3
Yoshiro_Fujimori
15 - Aurora

Hi @AshBlue20 ,

 

Your case sounds suitable for Test tool or Expect Records tool.

Have you considered using one of them?

 

https://help.alteryx.com/20223/designer/test-tool

https://community.alteryx.com/t5/Community-Gallery/CReW-Expect-Records/ta-p/984111

 

In case of Test Tool, you can configure so that an error message is output to the log

when the output data has different number of rows from the expected number.

Yoshiro_Fujimori_0-1683334163694.png

 

You can make a separate workflow which monitors the folder for Log files to search for the error message:

The test "Record Count Test" failed

 

I hope this may be of some help.

RobertOdera
13 - Pulsar

Hi, @AshBlue20 

 

Kindly consider the below for guidance - I hope you find it helpful

 

Scenario = error records exist, i.e., [count] !=0

RobertOdera_0-1683387819716.png

 

Scenario = error records do not exist, i.e., [count] =0

RobertOdera_1-1683387973271.png

 

AshBlue20
5 - Atom

Thank you both for your responses. 

 

I should clarify. Here is an example of what is happening. My goal is to evaluate the record count out of the L anchor of the join tool. If record count (from L)=0, then don't output the outputerrors.xlsx file. 

 

workflow example.png

Labels
Top Solution Authors