Alteryx Designer Desktop Discussions

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

Output 0 Records

MadeInHB
8 - Asteroid

So I have built a workflow that will filter outputs based on Month.  It doesn't take into account year.  Once the month has passed, 0 records will be passed through into that month's output.

 

I am curious on the output.  It appears in my testing that Alteryx will not over right a yxdb if there are 0 records.  The yxdb appears to have kept all the records from the last run with records based on the formula.

 

I just want to verify my thinking.  Workflow runs through out the month.  Yxdb is saved.  Then when 0 records show up, Alteryx will not overwrite that yxdb with 0 records correct?

5 REPLIES 5
MarqueeCrew
20 - Arcturus
20 - Arcturus

@MadeInHB,

 

Alteryx will save over a file with data if you tell it to write to that file (even if there are 0 records).  Would you like to know a trick to prevent that?  Don't share it with anyone else!

 

Spoiler
Create a "Filename" variable and give it a formula like:

IIF([Count] = 0,"Zero Data","My outputfile")

Now in your output, you can take table/file name from variable and select that option.  Take the filename and remove it from output.  When there is data, it uses the "My outputfile" name and when there is 0 data, it writes to a harmless file.

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MadeInHB
8 - Asteroid

I have been doing some testing and it appears Alteryx isn't writing a yxdb with 0 records as well as not over writing the previous is there is 0 records. 

 

But I am going to test your way as a fail safe.

MadeInHB
8 - Asteroid

I like your idea as a fail safe just in case.  Thanks!

Karunakaran
5 - Atom

unable to implement the solution, can you share a sample workflow

Nutan_NT
5 - Atom

I have the similar issue, where I am using the option- "delete data and append" while loading data to a oracle table. It is working fine when the number of records are 1 or more, however the data is not getting deleted when there are 0 records, I was expecting the table to be empty when 0 records are loaded with the option-"delete data and append", is that how Alteryx is expected to work?

Labels