This commit is contained in:
dheepa
2021-10-28 09:12:13 +00:00
parent f3cf5e1d2d
commit 8402c9b738
74 changed files with 3883 additions and 908 deletions

View File

@@ -1,7 +1,22 @@
#!/bin/bash -e
HOME="/home/compegence/customer"
#/****************************************************************
#****** ForeWarn Licensing and / or usage Terms and Conditions *****
#ForeWarn. The NextGen Insights Solution Platform
#Copyright © 2021 COMPEGENCE. All Rights Reserved
#ForeWarn is a product of COMPEGENCE.
#To be used only with a valid license from COMPEGENCE
#www.compegence.com info@compegence.com
#****************************************************************/
#HOME="/home/compegence/customer"
#Directories
homeDir=$HOME/MMT
fileDir="/data/customer/MMT"
homeDir=$HOME/customer/MMT
configDir=$homeDir/conf
input_file=$configDir/etl-config.txt
declare -A credentials
@@ -25,15 +40,15 @@ for filesyspk in ${filesyspks}
do
IFS="|" read name endstatus endnote <<<`$postgres_con -c "select file_name,end_status,end_status_note from fw_core.fw_jobctl_file_runschedule where file_syspk=$filesyspk"`
filename=$(echo $name | sed 's/[[:space:]]/\\ /g')
if [ $endstatus == "success" -a $endnote == 'TRX_completed' ]
if [ $endstatus == "success" -a $endnote == 'ODS_completed' ]
then
echo " moving file:$filename to processed folder"
move=$(echo "mv $homeDir/files/landing/$filename $homeDir/files/processed/$filename")
move=$(echo "mv $fileDir/files/landing/$filename $fileDir/files/processed/$filename")
eval $move
else
echo "moving file: $filename to error_file folder "
move=$(echo "mv $homeDir/files/landing/$filename $homeDir/files/error_file/$filename")
move=$(echo "mv $fileDir/files/landing/$filename $fileDir/files/error_file/$filename")
eval $move
fi