diff --git a/src/main/resources/log4j.xml b/src/main/resources/log4j.xml index 7414156..b831561 100644 --- a/src/main/resources/log4j.xml +++ b/src/main/resources/log4j.xml @@ -6,14 +6,14 @@ - + - + diff --git a/src/main/resources/sql/usefulQueries.sql b/src/main/resources/sql/usefulQueries.sql index 7b77a6d..7984234 100644 --- a/src/main/resources/sql/usefulQueries.sql +++ b/src/main/resources/sql/usefulQueries.sql @@ -45,4 +45,32 @@ BEGIN execute 'delete from table_metadata where schema_name = ''' || in_impl_schema || ''';'; return true; END -$$; \ No newline at end of file +$$; + +-- List all waiting triggers for ETL , in ascending order of next trigger +select + qt.trigger_state, + qt.trigger_type, + qjd.job_name, + qjd.sched_name, + qjd.job_group, + qjd.description, + qt.next_fire_time +from public.qrtz_triggers qt + join public.qrtz_job_details qjd + on qt.sched_name = qjd.sched_name + and qt.job_name = qjd.job_name + and qt.job_group = qjd.job_group +order by qt.next_fire_time asc; + +-- List currently running ETL job +select qft.state, + qt.trigger_state, + qt.trigger_type, + qjd.job_name, + qjd.sched_name, + qjd.job_group, + qjd.description +from qrtz_fired_triggers qft + join qrtz_triggers qt on qft.job_name = qt.job_name + join qrtz_job_details qjd on qt.sched_name = qjd.sched_name and qt.job_name = qjd.job_name and qt.job_group = qjd.job_group;