Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Launch Alteryx workflow from within Python script?

Storm
9 - Comet

Say I have folder 'x' in which lives 'workflow.yxmd'. Can anyone Python-conversant help me with a snippet of code which could possibly trigger this workflow to run?

 

Clarification - the .py would be initiated external to Alteryx, not from within it. ALSO let me clarify I would be trying to run the Alteryx workflow within designer / desktop app (the workflow lives on the local machine), NOT from the gallery/server.

 

So basically I look to be able to have the Python program:

 

a) Do some stuff
b) Kick off Alteryx workflow 'workflow.yxmd' in folder 'x'
c) [optional] do other stuff after kicking off the workflow

 

Ideally, in a perfect world, I'd love to have the flexibility for c) above to either 1) execute as soon as it kicks off the Alteryx workflow, or 2) kick off the workflow AND WAIT for the Alteryx workflow to complete before c) executes [is this possible?]

 

I am a just-beyond-beginner Python user, able to create simple things, but haven't figured this out yet if it's possible, and would welcome some help.

15 REPLIES 15
Storm
9 - Comet

Yes, done, thank you again!!

Analytics_Pooja
8 - Asteroid

I am getting Return Code = 2. Any suggestions?

 

RuchikaMangla
8 - Asteroid

Hi @DiganP

 

Thanks for sharing this, its really helpful.

 

Actually it just returns the messages(whatever it writes in log file), could you please help me out how can i read the resultset in tabular form of my workflow? Any help would be appreciable, thanks!

 

RuchikaMangla_0-1591344953916.png

 

 

 

jainna19121990
6 - Meteoroid

Is it also possible to schedule workflows using Python? 

 

There is a requirement, that Python be used to schedule workflows since the server has too much load so we cant schedule all the workflows in the Alteryx server.

 

If yes, please guide me since I have never used Python Alteryx.

mceleavey
17 - Castor
17 - Castor

@jainna19121990 ,

 

It sounds like you need to upgrade your server. You can buy add-ons to upscale your server both horizontally and vertically to allow for more concurrency and greater load.

This would be preferable to triggering desktop python loads. 

 

M.



Bulien

jainna19121990
6 - Meteoroid

But updating server is not the option right now. They are looking for some Python code that can schedule Alteryx workflows. Any idea how to do that? 

Labels