What is the best way to get started with KNIME and Python? I found the “KNIME Python Integration” extension - and installed it - but the PDF documentation seems out-of-date: File/Preferences on my KNIME 4.2.2 does not look like what is documented: https://docs.knime.com/2018-12/python_installation_guide/index.html
I have a fair amount of Python code that I’ve been running with PyCharm, but I’d like to use KNIME as a “front-end”, and combine my Python scripts/modules with other KNIME functionality.
The documentation is confusing me. I’d really like to leverage KNIME to boost my Python (and SQL Server) work, but I’m worried that KNIME Python integration may be a “work in progress”…
The python integration requires you to put your Python core into the according Python node. Of course if you have your own modules and installed them into the according environment you can use them like any other module but you still need to write python code to call your modules. However making your own models makes sense if the code is complex enough to have all the proper tools available.
As a warning / information to some level yes, integration is work in progress. It works fine. The real issue currently is that all data is getting serialized back and forth from knime to python and vice-versa.This is slow and often takes longer than the actual data manipulation. So it should only be done if it can’t be done easily in KNIME itself. (loops are slow in knime and python (or R) snippet is the only place you can complex “whole table actions” eg pandas.apply stuff).
Work in progress because KNIME is planning to move all memory off-heap probably using arrow (like Nvidia rapids). That way no serialization is needed anymore. That will be a tremendous step and tremendous win (eg. work in progress as a good thing as it is only getting better and worth it to already invest)
Thanks for those examples, I will look into them.
I have otherwise written my temporary data as csv, called a phython shell externally and read the file output from python back into knime.
Same idea I guess.