Alteryx Designer Desktop Discussions

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

Preventing overwriting .csv files when data is not available for the day

JioLessard
5 - Atom

Hello Alteryx community,

 

I currently have a workflow that works as expected when the data is available for the day. The workflow takes todays file from a folder and copies them into another one. Here's a picture of the workflow:

wf.png

My problem comes up when the data isn't available for every file. In such a case, I would like to keep the old data inside the new folder for the files where the data isn't available.

 

To help illustrate my situation, here's an example. So, the workflow last ran on the 23rd and since all data from every files was available, I have these files in the folder:

 

23.png

Now, today, not all data was available for every file, and with my current workflow, I end up with these files in folder:

25.png

As you can see, there are empty files. The results I would like to end up with is something like this:

2325.png

 

Any help or pointers would be greatly appreciated.

Thank you,

JioLessard

 

 

 

 

4 REPLIES 4
fmvizcaino
17 - Castor
17 - Castor

Hi @JioLessard ,

 

Attached is an example showing how to control file generation when there isn't data available for the output.

To control the file generation, I have used the 'take file from field' option in output data tool, as showed in attached workflow. 

 

Best,

Fernando V.

JioLessard
5 - Atom

Thank you for your answer @fmvizcaino !

 

Your solution works flawlessly for files that don't have data available for the day, but for the files which have data for the day, for example "CA_KPIMAT", the files isn't replaced and new files are created for each Field_1 value possible, in this case, empty, CA50 or CA51. Here's a screenshot of the result inside the folder:

 

fffffffffffffffffffff.png

Here's a screenshot of the setup of my output if this helps:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.png

Every output is configured the same way.

 

Is there anything I'm missing?

 

Thank you,

JioLessard

 

fmvizcaino
17 - Castor
17 - Castor

Hi @JioLessard ,

 

Take a look at the attached example showing how to do it in your workflow, let me know if you have any more questions.

 

Best,

Fernando Vizcaino

JioLessard
5 - Atom

This works perfectly, thank you very much for you time! @fmvizcaino 

Labels