How to deploy Python code thats being called from tSystem on Remote Engine

Seven Stars

How to deploy Python code thats being called from tSystem on Remote Engine

I have a python script that I'm using in tSystem component. How do I make this script part of deployment when deploying my Talend jobs to Remote Engine?

 


Accepted Solutions
Seven Stars

Re: How to deploy Python code thats being called from tSystem on Remote Engine

Found a better way to do this.

 

Add python script under Resource. Then, create 2 context variable:

#1 for python path 

"cmd /c python "

#2 for referring a Resource  

Untitled.png

Then in you tSystem component 

set Command to be

context.python_path + context.aurora_config_script

 

It can be further simplified by adding Python path in the script itself using shebang, then you don't need python_path context variable.

This also helps with maintaining separate repository for your scripts. 

View solution in original post


All Replies
Forteen Stars

Re: How to deploy Python code thats being called from tSystem on Remote Engine

good question!

 

would be interesting - if proper solution available.

 

we deploy scripts independently and "hard-soft" code name:

  • variable name - context.script_root 
  • relative path to script from parent folder

so, all script located in the same root folder which could be adjusted by context variable

 

 

-----------
Seven Stars

Re: How to deploy Python code thats being called from tSystem on Remote Engine

Found a better way to do this.

 

Add python script under Resource. Then, create 2 context variable:

#1 for python path 

"cmd /c python "

#2 for referring a Resource  

Untitled.png

Then in you tSystem component 

set Command to be

context.python_path + context.aurora_config_script

 

It can be further simplified by adding Python path in the script itself using shebang, then you don't need python_path context variable.

This also helps with maintaining separate repository for your scripts. 

View solution in original post

Forteen Stars

Re: How to deploy Python code thats being called from tSystem on Remote Engine

good choice! unfortunately, will work only for the subscription version

but still good

-----------

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog