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

How can I stop generate blank output files

munipavankumar
8 - Asteroid

Hi Team,

In my WF, I have multiple inputs and multiple outputs that are generated by the Render Tool. It is generating the blank output files when there is no data available in the input side. I want output files when there is data. I don't want to generate blank output files. How can I do this? Any suggestions please...!

21 REPLIES 21
binuacs
21 - Polaris

@munipavankumar USe filter tool to remove any blank rows before connecting to the table tool

munipavankumar
8 - Asteroid

Hi @binuacs, I already used Filter tool and There is no data in the Output. The same connected to the Table and Render Tool. Still I am getting blank output file.

 

binuacs
21 - Polaris

@munipavankumar I would suggest you to use the count record tool to take the count of the records in the file. If the file is empty the count record tool will give 0 count then use a filter tool to only process if the count > 0 . in that case you will not get blank output

Raj
16 - Nebula

In Alteryx, when you are using the Render Tool and you want to avoid generating blank output files, you can implement a logic check to ensure that the files are only created if there is data available. Here's a step-by-step approach to achieve this:

 

Add a Record Count Tool: Before the Render Tool, add a Record Count Tool to count the number of records in your data stream.

 

Filter Tool: Use a Filter Tool after the Record Count Tool to check if the record count is greater than zero.

 

Split the workflow using the Filter Tool:

If the record count is greater than zero, continue to the Render Tool.
If the record count is zero, do not proceed to the Render Tool.
hope this helps

munipavankumar
8 - Asteroid

Hi, The below one is the sample workflow of with data and without data. Both are generating output files.

1.png

I have followed your steps, but still getting errors. Please correct me if I did wrong.

1. When I add Count Records tool, I am not getting actual data.

2. "Table" is missing in Render Tool.

3.png

4.png

afellows
8 - Asteroid

I would use a message tool for this. Just remove the empty row count row and column afterwards. I guess you might need to sort it to make sure that the first record is the row count to ensure nothing further is passed through if the test is not passed.

Capture.PNG

munipavankumar
8 - Asteroid

Hi @afellows I am quite not sure about the Message Tool. If possible please share the Workflow. Thanks.

binuacs
21 - Polaris

@munipavankumar Sample attached

image.png

munipavankumar
8 - Asteroid

Hi @binuacs, Thanks for sharing the Workflow. The same workflow I have used. In the Render Tool output options you have selected temporary document.  But, I have selected Excel file as output. By default the file is generating even we don't have any data. May be it is taking blank Table as a reference to generate the output. You can see attached screenshot. Even my workflow has same issue if I select Excel as output. Unfortunately, the problem is not resolved.

1.png

Labels
Top Solution Authors