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

Highlighted
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
Highlighted
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
Highlighted
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

 

 

-----------
Highlighted
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

Highlighted
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 GARTNER 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

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

Downloads and Trials

Test drive Talend's enterprise products.

Downloads