sql files
This commit is contained in:
42
ReadMe.txt
Executable file
42
ReadMe.txt
Executable file
@@ -0,0 +1,42 @@
|
||||
#For folder mmt:
|
||||
pre requisite:
|
||||
1. Table fw_core.fw_jobctl_runschedule has a column (end_time) , this column needs to be updated to current date
|
||||
one can run following queries to update time:
|
||||
update fw_core.fw_jobctl_runschedule set end_time=current_timestamp
|
||||
|
||||
2. (optional): tables <fw_core.fw_jobctl_runschedule>, <fw_core.fw_jobctl_file_sheet_runschedule>, <fw_core.fw_jobctl_file_runschedule> has column <end_status>
|
||||
the data for this column should be "stg1-completed". if this column has different value apart from the expected values then run the below queries:
|
||||
update fw_core.fw_jobctl_runschedule set end_status =case when end_status <> '' then 'stg1-completed' end
|
||||
update fw_core.fw_jobctl_file_sheet_runschedule set end_status =case when end_status <> '' then 'stg1-completed' end
|
||||
update fw_core.fw_jobctl_file_runschedule set end_status =case when end_status <> '' then 'stg1-completed' end
|
||||
|
||||
3. select fn_update_na()
|
||||
|
||||
Now
|
||||
1. compile:
|
||||
In unix terminal, navigate to scripts folder ( home/jagadish/mmt/scripts)
|
||||
In terminal type: ./run_onetime_compile.sh
|
||||
In Terminal Type: ./run_onetime_compile.sh 1>/dev/null
|
||||
this will only print errors on the screen.
|
||||
|
||||
This will compile all applications by creating tables,inserting data etc.
|
||||
|
||||
run_onetime_individual will run compile single folder (plz change the script as per needs)
|
||||
|
||||
2. on linux : run wrappers:
|
||||
wrapper : run_master_wrapper.sh is a wrapper that executes all wrapper function
|
||||
it fails to execute if jobctl_runschedule table count is zero for the current date
|
||||
else executes all the wrappers
|
||||
running wrapper:
|
||||
running run_master_wrapper.sh:
|
||||
to run this wrapper just type in terminal: ./run_master_wrapper.sh
|
||||
This will execute all the wrappers function.
|
||||
Done
|
||||
|
||||
one can test things by executing following queries in DBeaver:(
|
||||
select * from fw_core.db_run_status where error_timestamp::date = date'2021-05-25%';
|
||||
select * from fw_core.fw_jobctl_file_runschedule where run_schedule_date::date = date'2021-05-25%';
|
||||
select * from fw_core.fw_jobctl_file_sheet_runschedule where run_schedule_date::date = date'2021-05-25%';
|
||||
select * from fw_core.check_model_count where create_timestamp::date = date'2021-05-25%;
|
||||
select * from fw_core.check_mnemonic_count where create_time::date =date'2021-05-25%;
|
||||
select * from fw_core.check_table_stg_trx_count where create_time::date =date'2021-05-25%;
|
||||
Reference in New Issue
Block a user