From aab089c468e04c687f5150d3c0400f1349cb2664 Mon Sep 17 00:00:00 2001 From: himeshr Date: Tue, 7 Jan 2025 16:35:44 +0530 Subject: [PATCH] #110 | Query to list org-uuids and org-group-uuids with ETL enabled --- Makefile | 2 +- src/main/resources/sql/usefulQueries.sql | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e3f59e4..b5eb22d 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ debug_server_with_dump_data_org: build_server OPENCHS_DATABASE_NAME=avni_org OPENCHS_CLIENT_ID=dummy OPENCHS_KEYCLOAK_CLIENT_SECRET=dummy AVNI_IDP_TYPE=none java -Xmx2048m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar ./build/libs/etl-1.0.0-SNAPSHOT.jar start_server_prerelease: build_server - -mkdir -p /tmp/openchs && sudo ln -s /tmp/openchs /var/log/openchs + -mkdir -p /tmp/avni-etl-service && sudo ln -s /tmp/avni-etl-service /var/log/avni-etl-service AVNI_IDP_TYPE=cognito \ OPENCHS_CLIENT_ID=$(OPENCHS_CLIENT_ID) \ diff --git a/src/main/resources/sql/usefulQueries.sql b/src/main/resources/sql/usefulQueries.sql index 7984234..4a83c35 100644 --- a/src/main/resources/sql/usefulQueries.sql +++ b/src/main/resources/sql/usefulQueries.sql @@ -74,3 +74,10 @@ select qft.state, 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; + +-- Query to list org-uuids and org-group-uuids with ETL enabled (SyncJob) +select job_name +from (select uuid organisationUUID from organisation) foo + right join qrtz_job_details qjd on organisationUUID = qjd.job_name +where qjd.job_group = 'SyncJobs' + or qjd is null; \ No newline at end of file