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

1 ACCEPTED SOLUTION

Accepted Solutions
Twelve Stars TRF
Twelve 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
1 REPLY
Twelve Stars TRF
Twelve 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