sql
This commit is contained in:
6
onetime/commonfunctions/fn_check_count.sql
Normal file → Executable file
6
onetime/commonfunctions/fn_check_count.sql
Normal file → Executable file
@@ -130,8 +130,8 @@ group by table_name, syspks, file_mnemonic, file_sheet_mnemonic;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_nmt_noise_at_operator_ear_level_block',count(*) from staging2.budni_nmt_noise_at_operator_ear_level_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_nmt_spec_h1_block',count(*) from staging2.budni_nmt_spec_h1_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_nmt_test_obs_summary_block',count(*) from staging2.budni_nmt_test_obs_summary_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_pto_mmtkeyword1_block',count(*) from staging2.budni_pto_mmtkeyword1_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_pto_mmtkeyword2_block',count(*) from staging2.budni_pto_mmtkeyword2_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_pto_Parameter1_block',count(*) from staging2.budni_pto_Parameter1_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_pto_Parameter2_block',count(*) from staging2.budni_pto_Parameter2_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_pto_perf_report_block',count(*) from staging2.budni_pto_perf_report_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_pto_spec_h1_block',count(*) from staging2.budni_pto_spec_h1_block where create_time::timestamp >= p_date;
|
||||
insert into fw_core.check_table_stg_trx_count(schema_name,table_name,row_count) select 'staging2','budni_pto_summary_block',count(*) from staging2.budni_pto_summary_block where create_time::timestamp >= p_date;
|
||||
@@ -322,7 +322,7 @@ EXCEPTION when OTHERS then
|
||||
err_hint = pg_exception_hint, /* No data error capture */
|
||||
err_context = pg_exception_context; /* PL/pgSQL function staging2.fn_ftdry_trs_block(integer,integer,text,text,integer) line 69 at RAISE*/
|
||||
|
||||
update fw_core.fw_jobctl_runschedule_jobstep set end_status_note = 'check count failed', end_status='error' ,end_time= now() where job_id=__jobid and step_id=__stepid and latest_runschedule_flag='1';
|
||||
update fw_core.fw_jobctl_runschedule_jobstep set end_status_note = 'check count failed', end_status='success' ,end_time= now() where job_id=__jobid and step_id=__stepid and latest_runschedule_flag='1';
|
||||
|
||||
perform fw_core.fn_insert_db_error ( __client_id, __function_id, 1001, 'Compegence', __file_syspk ,__file_mnemonic,__file_sheet_mnemonic ,null,'Check_Count', 'fn_check_count', err_state, err_msg, err_detail, err_hint, err_context,'error');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user