Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to stop the Workflowpart when we have no records

df
8 - Asteroid

Hello,

 

i have two google sheets outputs ... only one of them should write things (depending on the filter -> True or False has all Date -> the other has no Records.
Problem: Even though the data is empty (0 records) the google sheets tool still writes into google sheets.
How can i stop that if we have zero records?

grafik.png

6 REPLIES 6
Qiu
20 - Arcturus
20 - Arcturus

@df 

How about put a filter before the output tool?

with a Count Record Tool, if record >=1 then write data.

if Record =0, do nothing.

df
8 - Asteroid

@Qiu 
That does not work.
Then the Filter also outputs 0 records and the google sheets tool still writes a new file.

Qiu
20 - Arcturus
20 - Arcturus

@df 

Even after the Upper Joint tool?

df
8 - Asteroid

@Qiu 
Yes - Left and Joint Output has no data but again the Header -> Google Sheet Tool still starts.

32bit
8 - Asteroid

I've always handled this by putting the output tool inside of a batch macro and controlling it using a count tool + a filter into the ? of the macro input. A file path can then also be transferred to make the output batch macro more generic and not specific to the file you are trying to output.

 

Another method is to put the path and filename into a new column and use that column in the output tool, but I'm not sure if that is an option with the tool you are using since I've never used that particular tool.

SeanAdams
17 - Castor
17 - Castor

Agree with @32bit 

Best way to do this is to wrap it in a macro - then you can either use detours or you can control the flow more closely by using Batch Macros.    

 

As you say - unless you do this - Alteryx will write a zero-row file which is not what you want - and it does this because it builds the execution path of the Alteryx Workflow before it knows how many rows exist, and every tool on that execution path executes.    This can be a challenge for anything that calls APIs or scrapes webpages.

Labels