passing convext parameter value to the shell scripts in tSSH to execute the Hive scripts

Six Stars

passing convext parameter value to the shell scripts in tSSH to execute the Hive scripts

Hi Team,

 

I need some immediate help from you, I have job that run the shell scripts in the Hive, for that I need some parameters to be passed from the context variable (context.batch_ID) some are directly given like table name like material_detail and so on.

 

I'm using tSSH component to do this , the below is my code in the tSSH component , but when I run the script its saying

"sh: Load_EDW_Table_v1_0.sh: No such file or directory" and nothing got executed, but the server , directory are correct. what's wrong with this syntax ? if its wrong tell me how to pass the parameter value outside the scripts ? can anyone help ?

 

tSSH component comment:

"sh Load_EDW_Table_v1_0.sh '"+context.Batch_ID+"' material_detail Material_PK /root/EDWTableLoad/HiveQl/Script_scdtype2_edw_layer_material_detail_v1_0.sql"

 

My shell scripts parameters:

# send the batch number as parameter to all shell script
vbatchNumber=${1}
# send the edw table as parameter to all shell script
vtablename=${2}
# send the edw table as parameter to all shell script
vPrimaykey=${3}
# send the module or sql script name parameter to all shell script
vmoduleName=${4}

 

Thanks in advance

by

Tamil


Accepted Solutions
Sixteen Stars TRF
Sixteen Stars

Re: passing convext parameter value to the shell scripts in tSSH to execute the Hive scripts

Hi,

Try to add the path before the script name, giving:
/usr/blablabla/Load_EDW_Table_v1_0.sh

TRF

View solution in original post


All Replies
Sixteen Stars TRF
Sixteen Stars

Re: passing convext parameter value to the shell scripts in tSSH to execute the Hive scripts

Hi,

Try to add the path before the script name, giving:
/usr/blablabla/Load_EDW_Table_v1_0.sh

TRF

View solution in original post

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

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog