I have the below script triggered daily at 330am in the morning, since last 7 days job not writing anything to database.
below impala shell calling shell file which has sql , it is extracting data and loads to a flat file txt file. which is going wrong for last 1 week.
need help, echo statements writing to log, want to write to log write after impala shell call, whther the call is successful or not, if any exception want to write the error message details to log file.
echo "Start Time:" `date` >> $LOG_DIR/$log_file ##this line written to log file
echo "Process: code value sql " >> $LOG_DIR/$log_file ##this line written to log file
echo " " >> $LOG_DIR/$log_file
ETL_STEP_HANDLE=`$TTPCONTROL/etl_open_call.sh stage_process.CODE_VALUE_SQL hadoop TTPhadoop hadoopsvc`
impala-shell -k -i svrhdpw03.mch.corp.int:21000 --quiet -f $SQL_DIR/load_m_dw_code_value.sql
###Right after above impala shell call, want to write to log whether pass or fail info with reason
ETL_STEP_HANDLE=`$TTPCONTROL/etl_close_call.sh $ETL_STEP_HANDLE SUCCESS 0 0
Thanks a lot for the helpful info.