Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Error and providing back files

5 - Atom

Hi, 

 

I've built a workflow to run on the Alteryx server. What it does it to check some data quality and load the data into a SQL server.

 

However, if I find any errors in the data, I write these out to a 'log' file (excel) and use a comment tool to kill the process so that the data never makes it to the SQL server.

 

The bit that I'm getting stuck on is, how do I give the user back the log file, as on a successful run of the workflow it can be provided back, but is there no capability to provide this log file back if it errors?

 

TimTim_0-1596039761864.png

 

Alteryx Partner

Hi @TimTim 

There are a couple of ways you could handle creating output for the user.

 

One option is to have the user input a file directory (using a Text Input Tool) to the app, which will then be used to configure the output path. Then log will be written to whatever location is provided. 

 

Another option is to always have it write out a log file that can either give a status of success or enumerate the errors present. This will require logic to ensure that the file is written before the message tool ends the process. 

 

I hope this is helpful. 

 

 

 

 

5 - Atom

Thanks for this and will be able to resolve the issue using a bit of a blend.

 

I tried getting the user to input a file directory, however, when the directory is their c:\ drive from the server's perspective, it can't write to their machine and doesn't know where this address is. That solution does work if it's a network directory.

 

So what we have done is set up a folder on the network where the individuals required have read-only access, then getting the workflow to write to the file prior to the comment tool erroring and then pointing the users to that directory within the comment error.

 

Thanks for the help, it contributed to the final solution.