how to call python code in talend

Six Stars

how to call python code in talend

Hi All,

 

how to call python code in talend? Any Idea?

 

Thanks

Shree

Seven Stars

Re: how to call python code in talend

You can use a tSystem component to do that, as long as its a script on the filesystem.

Six Stars

Re: how to call python code in talend

Hi,

 

Can you show me screen shot how to call python script in window machine.

 

Thanks

Shree

Moderator

Re: how to call python code in talend

Hi,

Do you run python script? If so, please make sure that you can execute your python script successfully  from command prompt.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: how to call python code in talend

I am trying to do the same but not able to run python code from talend but not able to do that!

Hello, I am trying to do call a python script from tSystem component but not able to do it successfully:

 

I am getting different kinds of errors as I am changing the script path in Command field:


Command: “python \ C:\\Users\\user\\PycharmProjects\\AWS_Projects\\S3_Copy_to_other_bucket.py”
Error: Invalid escape sequence

 

Command: “python \\ C:\\Users\\user\\PycharmProjects\\AWS_Projects\\S3_Copy_to_other_bucket.py”
Error: C:\Users\user\AppData\Local\Continuum\anaconda3\python.exe: can’t find ‘__main__’ module in ‘\\’

 

Command: “python C:\\Users\\user\\PycharmProjects\\AWS_Projects\\S3_Copy_to_other_bucket.py”
Error: File “C:\Users\agarg\PycharmProjects\AWS_Projects-ART\S3_Copy_to_other_bucket.py”, line 1, in
import boto3
ModuleNotFoundError: No module named ‘boto3’

 

Please let me know if any of you faced similar issues while you were executing this.