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?
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.
@Qiu
That does not work.
Then the Filter also outputs 0 records and the google sheets tool still writes a new file.
Even after the Upper Joint tool?
@Qiu
Yes - Left and Joint Output has no data but again the Header -> Google Sheet Tool still starts.
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.
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.
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |