Alteryx Designer Desktop Discussions

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

Output Error Message

NachoArg
7 - Meteor

Hi, does anyone know why the first workflow run correctly but the second one produce an error message? The output tool configuration is the same.

 

Regards,

Ignacio

 

NachoArg_0-1621610361899.png

 

 

 

5 REPLIES 5
mceleavey
17 - Castor
17 - Castor

Hi @NachoArg ,

 

it would help if you post the error message, but my assumption is it's because it's still writing the first output to the same workbook, which means it's in use when it tries to right the second. 

 

Show me the error and I'll be able to help a bit more.

 

M.



Bulien

NachoArg
7 - Meteor

Thank you M! Below you´ll find the error message:

 

Error: Output Data (4): Unable to open file for write: C:\Users\Desktop\Alteryx Pruebas\Several Files\-output.xlsx Error Opening file: C:\Users\Desktop\Alteryx Pruebas\Several Files\-output.xlsx: The process cannot access the file because it is being used by another process. (32)

 

If your assumptions "it´s still writing" is correct, is there any rule should I learn? I mean, it is mandatory three Tools between two separate output or something like that

mceleavey
17 - Castor
17 - Castor

Yeah, that's what it is.

 

You have two outputs going to two sheets. Union each like for like one together and put them out on two outputs. There's no need for four. 

You have two outputs going to sheet 1, and two going to sheet 2. Union the Sheet 1 outputs together, then the Sheet 2 outputs.

This should resolve the problem.

 

M.



Bulien

danilang
19 - Altair
19 - Altair

Hi @NachoArg 

 

Like @mceleavey said, the reason for the error is that the file is still open when the second tool tries to write to it.  The reason your first workflow works and the second doesn't has to do with timing.  The first workflow has a summarize tool before the second tool.  Summarize operations tend to take a long time, depending on the number of rows in your input dataset and the operations that your performing.  So the summarize tool slows down the workflow just enough so that the first write operation is complete before the second one starts.  

 

In your second workflow, you only have a select tool on the bottom branch, which is just about the fastest tool available, since it just modifies the metadata and doesn't actually process the data in any way.  In this case, your 2 output tools try to access the same file almost simultaneously and the second one fails.

 

There are ways to deal with this kind of concurrency.  The most common one is the Block Until Done tool which waits for all the records to be processed out of the top output before sending the records out to the bottom.  Puyt your block until done before the filter and then copy the filter but put the opposite condition before you second output

 

danilang_0-1621699313696.png

 

Dan

   

NachoArg
7 - Meteor

Got it!  Thank you Dan for your clarification 🙂 

Labels