From 0fc8423fd26646715ba4961899f01808fb70bd74 Mon Sep 17 00:00:00 2001 From: Daniel Quathamer Date: Thu, 31 Oct 2024 15:18:13 +0100 Subject: [PATCH] Kleinkram #1 --- src-modules/module/etl/bin/SQL_ENV_etl.sam | 3 ++ src-modules/module/etl/conf/etl.xml | 4 +- .../module/etl/upgrade/etl_upgrade_man.sql | 42 +++++++++++++++++++ src/de/superx/elt/TableUploader.java | 2 +- 4 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 src-modules/module/etl/upgrade/etl_upgrade_man.sql diff --git a/src-modules/module/etl/bin/SQL_ENV_etl.sam b/src-modules/module/etl/bin/SQL_ENV_etl.sam index 19b680e..96efd78 100644 --- a/src-modules/module/etl/bin/SQL_ENV_etl.sam +++ b/src-modules/module/etl/bin/SQL_ENV_etl.sam @@ -13,4 +13,7 @@ ETL_LOGMAIL=$LOGMAIL; export ETL_LOGMAIL PATH=$ETL_PFAD/bin:$PATH export PATH +JAVA_OPTS="$JAVA_OPTS -DSUPERX_DIR=$SUPERX_DIR" +export JAVA_OPTS + diff --git a/src-modules/module/etl/conf/etl.xml b/src-modules/module/etl/conf/etl.xml index 75fd6e1..cc28396 100644 --- a/src-modules/module/etl/conf/etl.xml +++ b/src-modules/module/etl/conf/etl.xml @@ -1,6 +1,6 @@ - @@ -193,6 +193,8 @@ version integer + + diff --git a/src-modules/module/etl/upgrade/etl_upgrade_man.sql b/src-modules/module/etl/upgrade/etl_upgrade_man.sql new file mode 100644 index 0000000..99704b5 --- /dev/null +++ b/src-modules/module/etl/upgrade/etl_upgrade_man.sql @@ -0,0 +1,42 @@ + +--obsolete jobs: + +delete from etl_step +where tid in (select R.step_id +from etl_step_relation R, etl_job J +where R.job_id =J.tid +and J.uniquename in ('sx_select_mask', +'sx_insert_mask', +'kern_konstanten_update', +'sichten_unload', +'sos_gewichtung_unload') +and J.systeminfo_id=9); + +delete from etl_step_property +where etl_step_id in (select R.step_id +from etl_step_relation R, etl_job J +where R.job_id =J.tid +and J.uniquename in ('sx_select_mask', +'sx_insert_mask', +'kern_konstanten_update', +'sichten_unload', +'sos_gewichtung_unload') +and J.systeminfo_id=9); + +delete from etl_step_relation +where job_id in (select J.tid from etl_job J +where J.uniquename in ('sx_select_mask', +'sx_insert_mask', +'kern_konstanten_update', +'sichten_unload', +'sos_gewichtung_unload') +and J.systeminfo_id=9); + +delete from etl_job +where uniquename in ('sx_select_mask', +'sx_insert_mask', +'kern_konstanten_update', +'sichten_unload', +'sos_gewichtung_unload') +and systeminfo_id=9; + diff --git a/src/de/superx/elt/TableUploader.java b/src/de/superx/elt/TableUploader.java index 5d193ac..1e925cd 100644 --- a/src/de/superx/elt/TableUploader.java +++ b/src/de/superx/elt/TableUploader.java @@ -79,7 +79,7 @@ public class TableUploader { private boolean continueAfterError; private boolean removeTrailingDelim=true; private boolean isPostgres; - private boolean useBatch=true; + private boolean useBatch=false; private static int maxCols=1000; private String[] insert_cols = new String[maxCols]; private int[] insert_types = new int[maxCols];