none
Executing pythin from SSIS execute task RRS feed

  • Question

  • Hi everyone,

    This is how I am executing my python from Execute process in SSIS:

    C:/Users/datadude/AppData/Local/Continuum/miniconda3/envs/ra_platform-201909/python.exe e:/Source/Scripts/Python/rapc/kozuchi/core/qc/solactive_returns_qc.py --datasource solactive

    I have the same command in .bat file and I can execute .bat from SSIS execute task but if I put the whole command like above it doesn't work. Any help is appreciated. 

    Thanks,

    Ro

    Thursday, November 14, 2019 9:46 PM

All replies

  • Thursday, November 14, 2019 10:26 PM
  • Thank you, Yitzhak! I already went through that link and it was not very helpful. I can always execute a .bat file from SSIS and .bat file has python embedded in it. I want to call the python module directly from SSIS. Hard to see any good example on internet
    Thursday, November 14, 2019 10:32 PM
  • I get error

    The process exit code was "2" while the expected was "0".

    My configuration looks like belowlooks like this


    • Edited by YoBroRo Friday, November 15, 2019 12:13 AM
    Thursday, November 14, 2019 10:55 PM
  • Hi YoBroRo,

    Have you tried to copy the values of the properties "Executable","Arguments" to the cmd prompt window?  
    Then execute it and see if it works.

    How to Run a Python Script via a File or the Shell

    Best Regards,

    Will


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 15, 2019 2:06 AM
  • it runs fine if I run from a .bat file like this

    call C:/Users/datadude/AppData/Local/Continuum/miniconda3/envs/ra_platform-201909/python.exe e:/Source/Scripts/Python/rapc/kozuchi/core/qc/solactive_returns_qc.py --datasource solactive

    Friday, November 15, 2019 11:08 PM
  • it runs fine if I run from a .bat file like this

    call C:/Users/datadude/AppData/Local/Continuum/miniconda3/envs/ra_platform-201909/python.exe e:/Source/Scripts/Python/rapc/kozuchi/core/qc/solactive_returns_qc.py --datasource solactive

    I mean that the command should be executed like that. (Add double quotation marks)

    C:/Users/datadude/AppData/Local/Continuum/miniconda3/envs/ra_platform-201909/python.exe "e:/Source/Scripts/Python/rapc/kozuchi/core/qc/solactive_returns_qc.py --datasource solactive"	

    Best Regards,

    Will


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 18, 2019 6:34 AM