Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Workflow Malfunction

mihir_sampat
7 - Meteor

So I have made a custom standard macro as per my need. That macro has a python tool that fetches data from the Cloud. When I call that macro into the workflow and run the workflow, it runs properly. The issue arises when I run two workflows with the same macro simultaneously. 

Very unusual behavior occurs. Let's say I'm fetching table1 in workflow number 1 using my standard macro, and table 2 in workflow number 2 using the same macro. What happens is that workflow 2 throws an error which is as follows:

 

RuntimeError: Error creating the file " C:\Users\AppData\Local\Temp\Engine_3348_8e44062fd7924c478191425d277d1d82_\0328e956-f7d3-44fa-af6d-262d3ce5e43c\output_1.yxdb ": The process cannot access the file because it is being used by another process. (32)

and workflow 1 outputs the data of workflow 2. 

 

What could be the issue?

10 REPLIES 10
grazitti_sapna
17 - Castor

HI @mihir_sampat , this might be an issue for running workflows at the same time which is trying to access the file while the workflow is still in a running condition, try using block until done tool  after your workflow 1 and workflow 2 input.

 

Another thing you can try is using dynamic input tool since you are using the same file to fetch different tables, unless the schema is same and all the transformations are same you can do it in a single workflow as well. If the scheme is different and the transformations differ then unfortunately you have to give the above solution a try.

 

I hope this helps.

 

Thanks.

Sapna Gupta
mihir_sampat
7 - Meteor

Actually, I have to make the workflow run parallel to each other where I will be getting the data from different tables from the Google Cloud and then load them to the cloud at the same time.

grazitti_sapna
17 - Castor

@mihir_sampat  would it not be possible for you to first get the data from workflow one and once it is complete you can append the data from workflow 2 into the cloud in this case the workflow will run simultaneously but will only output the data once the workflow 1 has finished to run successfully. I have not seen a case where we can run a same file or for 2 different processes. It will always throw this error.

 

I suggest you using block until done tool then check if it works for you.

 

Thanks.

Sapna Gupta
mihir_sampat
7 - Meteor

Just to clarify. Workflow 1 and Workflow 2 are not dependent on each other. I simply want to run the two workflows parallelly using the same macro I have created. 

Which when done gives an unexpected output. Like I have mentioned earlier that the output of workflow 2 was shown in workflow 1 and workflow 2 throws an error.

grazitti_sapna
17 - Castor

@mihir_sampat , will it be possible for you to create a sample workflow so that I can replicate this issue and provide the solution?

 

Thanks.

Sapna Gupta
mihir_sampat
7 - Meteor

Sorry about the late reply. I couldn't get a chance to access my laptop.

 

This is my Macro:

mihir_sampat_0-1603694146750.png

Over here the text boxes are user inputs and the browse file tool fetches the path to the json key file.

All that data is passed to the python tool.

 

The following are the header to the text input tool:

mihir_sampat_1-1603694374645.png

 

The following is how the macro interface looks:

mihir_sampat_2-1603694686726.png

 

I have attached the python tool as python_code_to_fetch_data.yxmd file.

I hope this would give you a better idea of my situation. Regards.

 

 

grazitti_sapna
17 - Castor

@mihir_sampat , just a small query have you tried to run workflow  in parallel by using two different datasets?

I mean for workflow 1 you can use the dataset you are referring and for workflow 2 try using maybe a copy of dataset 1 but with different name. Usually what happens is if you are trying to access same file but different tabs this issue might occur so I would like you to test this scenario that I mentioned then we can try to investigate further.

Thanks.

Sapna Gupta
mihir_sampat
7 - Meteor

@grazitti_sapna 

Workflow 1 output when it is run separately (can share the headers only):

mihir_sampat_0-1603695491133.png

 

Workflow 2 output when it is run separately (can share the headers only):

mihir_sampat_0-1603695672511.png

 

When I run workflow 1 first and parallelly workflow 2 both the outputs are the same. 

mihir_sampat_1-1603695853224.png

 

This works against the concept of macros as both the workflows are somehow overlapping and using the same temp Alteryx file or Alteryx Engine.

Thanks

mihir_sampat
7 - Meteor

@grazitti_sapna your solution to run the two macros in different instances of Alteryx worked. I would like to know the reason as to why running it from a different tab gave us that issue.

Thankyou.

Labels