pythonpentahopentaho-spoonpentaho-data-integration

How to run anaconda python with "execute a process" in Pentaho(PDI) in windows?


I'm going to run a python program by "execute a process" in pdi and on a specific anaconda environment.

This is my solution which didn't work:

enter image description here

run_on_win = "C:\Users\x\Anaconda3\Scripts\activate.bat & python" 

api_call = my python file

Remains fields are my parameters

How these commands, which run successfully on cmd, raise this error in PDI?

Cannot run program "C:\Users\x\Anaconda3\Scripts\activate.bat & python": CreateProcess error=2, The system cannot find the file specified


Solution

  • At the end I created a .bat file with this content:

    conda activate churn & python %*

    the I assigned the path of that .bat file to run_on_win variable