Triggering the Knime Work flow using python

#1

Hi Team,

Can anyone explain how to trigger a KNIME Workflow using python

Pavan

0 Likes

#2

Hi @PavanKumar574,
take a look at this blogpost on how to integrate KNIME and Jupyter notebooks. That should get you started: https://www.knime.com/blog/knime-and-jupyter
best,
Gabriel

2 Likes

#3

Hi Team,

Thanks for the reply.

but i am trying to schedule the knime workflow using python code.

the code you provided above is doesn’t execute the workflow right?

please let me know if assumption is right?

0 Likes

#4

Scroll down to the ‘Using KNIME Workflows in Jupyter Notebooks’ section:

Another big new feature of KNIME 3.7 is that you can now easily call KNIME workflows from within a Jupyter notebook (or from other Python scripts).

1 Like

#5

Hi Swebb,

thanks for the reply that you have provided.

but our problem is that

Our KNIME Models sit on top of Data Warehouse.

Daily load of warehouse completes at irregular times, there is no fixed

time for completion.

All dependent downstream consumption of DWH data,

is based on python jobs, cron job looks for data load completion and

it triggers all other daily reports.

I hope you understand the problem. please let me know for any other queries.

Regards
Pavan

0 Likes

#6

Hi Pavan

I’m not sure if you still need help? The blog post from Greg which was linked shows how to execute KNIME workflows from python, how you trigger the execution of that python code is up to you.

You could have your cron job trigger the execution of the python code you want to wrap the execution of a knime workflow?

Cheers

Sam

0 Likes

#7

Just to provide the complete picture (admittedly, the commercial part): Use KNIME Server’s REST API to trigger execution of workflows from your Python scripts.

Best,
Stefan

2 Likes