added deployment folder with latest code

This commit is contained in:
Deepthi
2021-04-27 16:13:33 +05:30
parent 37f73d5dfd
commit c8985b2d62
112 changed files with 42492 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
drop function if exists mmt_staging2.fn_FTDRY_RUN;
CREATE OR REPLACE FUNCTION mmt_staging2.fn_FTDRY_RUN()
RETURNS void AS $$
declare
f record;
w_file_syspk int;
status text;
begin
for f in select file_syspk from mmt_ods.fw_jobctl_file_runschedule
where end_status like 'Staging1 Completed' and file_format='FTDRY'
loop
select f.file_syspk into w_file_syspk;
perform mmt_staging2.fn_FTDRY_TRS_Block(20,1,'FTDRY','FTDRY_TRS',w_file_syspk);
select e.status from mmt_staging2.mmt_DB_Run_Status e where file_syspk = w_file_syspk and sheet_mnemonic ='FTDRY_TRS' into status;
if status = 'success' then
perform mmt_staging2.fn_FTDRY_TRS_ODS(w_file_syspk);
end if;
perform mmt_staging2.fn_FTDRY_SUM_Block (20,1,'FTDRY','FTDRY_SUM',w_file_syspk);
select e.status from mmt_staging2.mmt_DB_Run_Status e where file_syspk = w_file_syspk and sheet_mnemonic ='FTDRY_SUM' into status;
if status = 'success' then
perform mmt_staging2.fn_FTDRY_SUM_ODS(w_file_syspk);
perform mmt_staging2.fn_test_output_FTDRY(w_file_syspk);
end if;
end loop;
end;
$$ LANGUAGE plpgsql;