One of our users needs to be able to run Alteryx from the command line as part of a longer process running from ESP (our enterprise scheduler).
The Alteryx workflow needs to run on our server.
In order to make that happen; does this need to run on the Controller or a Worker?
Are there any risks?
My concern is with running it on the controller - would we be effectively tying up a resource needed to send jobs out to workers?
Solved! Go to Solution.
Hi @patrick_mcauliffe, this can be achieved by using the AlteryxService.exe command line interface to run these workflows. The addtoqueue command will schedule a workflow for immediate execution by placing the job into the execution queue on your controller. You won't need to designate whether the workflow is run on the Controller or a Worker as the Controller will handle the queuing of the jobs which are then automatically picked up by the next available worker. This behavior is a lot like when a workflow has been scheduled to run using the Alteryx Scheduler. Here's a link to a Community post on the Server command line that you might find helpful: https://community.alteryx.com/t5/Engine-Works-Blog/Intro-to-the-Server-command-line/ba-p/13380. I hope this helps and feel free to let us know if you have any additional questions!
Thanks @JulieM. How could I have missed something so simple as addtoqueue!?
Once submitted, is there any way to determine when the workflow completes and if it completed successfully? I don't see a way, but thought I'd confirm.
Thanks!
Jeff
@JeffSpilinek Although there may be other methods, the way I determined was to have a second workflow check the record in the MongoDB.
Thanks JulieM. Is there a way that addtoqueue can broadcast error messages back to a third party scheduler like the AlteryxEngineCmd does?
@TTFSlvUnfortunately, not in the current implementation, but I can definitely see how this would be useful to have in the Server command line. To @JeffSpilinek's point, success and error indicators would certainly seem useful here so I am documenting this on my side here to see if we can look at adding this functionality for a future enhancement. I also encourage posting this as an Idea in the Idea's forum so other folks who are interested in this type of functionality can add stars to vote this up. Thank you!
Hi @patrick_mcauliffe,@JeffSpilinek @TTFSlv!
Wanted to check with you if there is a way to get a detailed log after the job is added to the queue?
I am looking to execute workflows through the queue but also need a success/failure response to trigger downstream dependent processes which are outside of Alteryx.
Thanks in advance!
Just two things I can think of off the top of my head:
1. The Gallery API can be used to check status of a job:
2. The other, and way that I more commonly did this was with a direct connection to the MongoDB.
If you aren't in a position to get direct Mongo access (like if it is controlled by a different part of your organization), I'd also suggest asking them to set up a read only user which would allow you to query it with little risk. If that doesn't pan out, I've worked with organizations before that had success by setting up ETL jobs which would pull status from the Mongo and drop into a reporting server (like SQL server) for the general consumption.
Appreciate your response, I will explore the Mongo route as well. The challenge is we are using a third party enterprise scheduler to execute jobs in production and need an automated way to immediately return a detailed log upon failure/success to allow support team to monitor and troubleshoot when needed.
The Gallery API just returns a flag which says pass/fail is what I understand. Is that true?