community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Output a file and re-input it within the same workflow

Alteryx
Alteryx
Created on

Sometimes clients have asked how they can re-input the same excel file that they have just outputted into the same workflow. Normally, their gut instinct would be to open up a new workflow and start fresh with the updated file. However, this can be a bit cumbersome especially if they want to do this multiple times or for those wanting to do some sort of logging process in an app. Luckily, there is a quick and easy trick for this.

 

Attached to this article is a workflow that I go through below...

 

inputtheoutput.jpg

 

Now the initial step to this might be different depending whether or not you already have a file that you want to bring in or not. If you are using just a regular Input tool, make sure you obtain the file path by selecting “Full Path” in the “Output File Name as Field” drop down. If you are writing in a text input make sure you have a field specifying the full path. This will be the same file path where we will output the data and bring it back in. The filepaths must be consistent throughout the workflow.

 

inputtheoutput3.jpg

 

After your data blending and data preparation is complete and you are ready to output the file, place a “Block Until Done” tool at the end of your stream. Make sure your first output is connected to an “Output” tool with your specified settings with the proper file path. Next, place a “Dynamic Input” tool and make sure you are reading the field with the file path and change the action dropdown to “Change Entire File Path”. For the “Input Data Source Template “ box, I just reference the same file that I am going to write to.

 

inputtheoutput4.jpg

 

And that is how you output a file then re-input it within the same workflow.

Attachments
Comments
Atom

Capture.PNG

 

 

Hi,

 

We are having trouble recreating this solution for multiple write commands. We are attempting to run write to two SQL tables, and delay reading data until both tables have been be written to. We are using a solution similar to that above, however it appears that the input is beginning to import the data before both write commands are completed.

 

Any insight as to why this may be happening and any work around solutions greatly appreciated

 

Thanks

Meteor
Good stuff! Kept me from having to run another workflow to just append (union) my most recent logs with the history file. Thanks for sharing