how to call python code in talend

Seven Stars

how to call python code in talend

Hi All,

 

how to call python code in talend? Any Idea?

 

Thanks

Shree

Eight 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.

Seven 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.

 

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch