9 changed files with 1437 additions and 1 deletions
			
			
		@ -0,0 +1,47 @@
				@@ -0,0 +1,47 @@
					 | 
				
			||||
#!/bin/bash | 
				
			||||
#Änderungen | 
				
			||||
#--------------------------------------------------------------------- | 
				
			||||
# Shell-Kommando "etl_execute_unload_job.x" | 
				
			||||
# | 
				
			||||
#--------------------------------------------------------------------- | 
				
			||||
 | 
				
			||||
if [ "$1" = "" ] | 
				
			||||
   then echo "Aufruf: etl_execute_unload_job.x job_uniquename FILTER <Ausgabedatei (optional)>" | 
				
			||||
	echo " " | 
				
			||||
	echo "Aktion: etl_execute_unload_job.x entlaedt Tabellen." | 
				
			||||
	echo "        Mit Hilfe von etl_execute_upload_job.x koennen diese Daten importiert werden." | 
				
			||||
	echo " " | 
				
			||||
	exit 0 | 
				
			||||
fi | 
				
			||||
 | 
				
			||||
#------------------------------------------------------------------- | 
				
			||||
#-- Metadaten entladen  | 
				
			||||
#------------------------------------------------------------------- | 
				
			||||
 | 
				
			||||
JOB_UNIQUENAME=$1 | 
				
			||||
 | 
				
			||||
FILTER=$2 | 
				
			||||
 | 
				
			||||
if [ "$3" == "" ] | 
				
			||||
   then outfile=$JOB_UNIQUENAME.xml | 
				
			||||
else | 
				
			||||
 | 
				
			||||
outfile=$3 | 
				
			||||
    | 
				
			||||
fi | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
SX_CLIENT=jdbc | 
				
			||||
export SX_CLIENT | 
				
			||||
CP=".:$JDBC_CLASSPATH" | 
				
			||||
 | 
				
			||||
CMD="java $JAVA_OPTS -cp $CP de.superx.elt.bin.EtlJobExecutor -dbproperties:$DB_PROPERTIES -job:$JOB_UNIQUENAME -outfile:$outfile -params:$FILTER" | 
				
			||||
 | 
				
			||||
echo $CMD | 
				
			||||
 | 
				
			||||
$CMD | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
@ -0,0 +1,47 @@
				@@ -0,0 +1,47 @@
					 | 
				
			||||
#!/bin/bash | 
				
			||||
#Änderungen | 
				
			||||
#--------------------------------------------------------------------- | 
				
			||||
# Shell-Kommando "etl_execute_unload_job.x" | 
				
			||||
# | 
				
			||||
#--------------------------------------------------------------------- | 
				
			||||
 | 
				
			||||
if [ "$1" = "" ] | 
				
			||||
   then echo "Aufruf: etl_execute_upload_job.x job_uniquename FILTER <Eingabedatei (optional)>" | 
				
			||||
	echo " " | 
				
			||||
	echo "Aktion: etl_execute_upload_job.x laedt Tabellen." | 
				
			||||
	echo "        " | 
				
			||||
	echo " " | 
				
			||||
	exit 0 | 
				
			||||
fi | 
				
			||||
 | 
				
			||||
#------------------------------------------------------------------- | 
				
			||||
#-- Metadaten entladen  | 
				
			||||
#------------------------------------------------------------------- | 
				
			||||
 | 
				
			||||
JOB_UNIQUENAME=$1 | 
				
			||||
 | 
				
			||||
FILTER=$2 | 
				
			||||
 | 
				
			||||
if [ "$3" == "" ] | 
				
			||||
   then infile=$JOB_UNIQUENAME.xml | 
				
			||||
else | 
				
			||||
 | 
				
			||||
infile=$3 | 
				
			||||
    | 
				
			||||
fi | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
SX_CLIENT=jdbc | 
				
			||||
export SX_CLIENT | 
				
			||||
CP=".:$JDBC_CLASSPATH" | 
				
			||||
 | 
				
			||||
CMD="java $JAVA_OPTS -cp $CP de.superx.elt.bin.EtlJobExecutor -dbproperties:$DB_PROPERTIES -job:$JOB_UNIQUENAME -params:PATH_TO_INPUTFILE=$infile" | 
				
			||||
 | 
				
			||||
echo $CMD | 
				
			||||
 | 
				
			||||
$CMD | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
 | 
				
			||||
@ -0,0 +1,62 @@
				@@ -0,0 +1,62 @@
					 | 
				
			||||
begin work; | 
				
			||||
 | 
				
			||||
delete from sichten where name_intern in (select name_intern from tmp_sichten); | 
				
			||||
 | 
				
			||||
insert into sichten(parent, | 
				
			||||
       systeminfoid, | 
				
			||||
       art, | 
				
			||||
       type, | 
				
			||||
       name_intern, | 
				
			||||
       name, | 
				
			||||
       beschreibung, | 
				
			||||
       sortnr, | 
				
			||||
       quelle, | 
				
			||||
       alt_hier_id, | 
				
			||||
       treecfgtable, | 
				
			||||
       treecfgid, | 
				
			||||
       label, | 
				
			||||
       user_rechte, | 
				
			||||
       rechtequelle, | 
				
			||||
       sesamkey, | 
				
			||||
       standbutton, | 
				
			||||
       attribut1, | 
				
			||||
       attribut2, | 
				
			||||
       attribut3, | 
				
			||||
       attribut4, | 
				
			||||
       xmlmaxentries, | 
				
			||||
       gueltig_seit, | 
				
			||||
       gueltig_bis, | 
				
			||||
       cacheapplet, | 
				
			||||
       cachexml, | 
				
			||||
       aktiv) select parent, | 
				
			||||
       systeminfoid, | 
				
			||||
       art, | 
				
			||||
       type, | 
				
			||||
       name_intern, | 
				
			||||
       name, | 
				
			||||
       beschreibung, | 
				
			||||
       sortnr, | 
				
			||||
       quelle, | 
				
			||||
       alt_hier_id, | 
				
			||||
       treecfgtable, | 
				
			||||
       treecfgid, | 
				
			||||
       label, | 
				
			||||
       user_rechte, | 
				
			||||
       rechtequelle, | 
				
			||||
       sesamkey, | 
				
			||||
       standbutton, | 
				
			||||
       attribut1, | 
				
			||||
       attribut2, | 
				
			||||
       attribut3, | 
				
			||||
       attribut4, | 
				
			||||
       xmlmaxentries, | 
				
			||||
       gueltig_seit, | 
				
			||||
       gueltig_bis, | 
				
			||||
       cacheapplet, | 
				
			||||
       cachexml, | 
				
			||||
       aktiv from tmp_sichten; | 
				
			||||
 | 
				
			||||
drop table tmp_sichten; | 
				
			||||
 | 
				
			||||
commit; | 
				
			||||
 | 
				
			||||
@ -0,0 +1,52 @@
				@@ -0,0 +1,52 @@
					 | 
				
			||||
begin work; | 
				
			||||
 | 
				
			||||
 | 
				
			||||
delete from  userinfo  where benutzer in (select benutzer from tmp_userinfo); | 
				
			||||
 | 
				
			||||
delete from  user_institution  where userid in (select userid from tmp_user_institution); | 
				
			||||
delete from  user_masken_bez where userinfo_id in (select userinfo_id from tmp_user_masken_bez); | 
				
			||||
delete from  user_sachgeb_bez  where userinfo_id in (select userinfo_id from tmp_user_sachgeb_bez); | 
				
			||||
delete from  user_pw  where userinfo_id in (select userinfo_id from tmp_user_pw); | 
				
			||||
delete from  user_sichtarten  where userinfo_id in (select userinfo_id from tmp_user_sichtarten); | 
				
			||||
delete from  user_sichten  where userinfo_id in (select userinfo_id from tmp_user_sichten); | 
				
			||||
delete from  groupinfo where tid in (select tid from tmp_groupinfo); | 
				
			||||
 | 
				
			||||
delete from  group_field_pref  where groupinfo_id in (select groupinfo_id from tmp_group_field_pref); | 
				
			||||
delete from  group_masken_bez  where groupinfo_id in (select groupinfo_id from tmp_group_masken_bez); | 
				
			||||
delete from  group_sachgeb_bez  where groupinfo_id in (select groupinfo_id from tmp_group_sachgeb_bez); | 
				
			||||
delete from  group_sichtarten  where groupinfo_id in (select groupinfo_id from tmp_group_sichtarten); | 
				
			||||
delete from  group_sichten  where groupinfo_id in (select groupinfo_id from tmp_group_sichten); | 
				
			||||
delete from  user_group_bez  where groupinfo_id in (select groupinfo_id from tmp_user_group_bez); | 
				
			||||
 | 
				
			||||
 | 
				
			||||
insert into  userinfo select * from tmp_userinfo ; | 
				
			||||
insert into  user_institution select * from tmp_user_institution ; | 
				
			||||
insert into  user_masken_bez select * from tmp_user_masken_bez ; | 
				
			||||
insert into  user_sachgeb_bez select * from tmp_user_sachgeb_bez ; | 
				
			||||
insert into  user_pw select * from tmp_user_pw ; | 
				
			||||
insert into  user_sichtarten select * from tmp_user_sichtarten ; | 
				
			||||
insert into  user_sichten select * from tmp_user_sichten ; | 
				
			||||
insert into  groupinfo select * from tmp_groupinfo ; | 
				
			||||
insert into  group_field_pref select * from tmp_group_field_pref ; | 
				
			||||
insert into  group_masken_bez select * from tmp_group_masken_bez ; | 
				
			||||
insert into  group_sachgeb_bez select * from tmp_group_sachgeb_bez ; | 
				
			||||
insert into  group_sichtarten select * from tmp_group_sichtarten; | 
				
			||||
insert into  group_sichten select * from tmp_group_sichten ; | 
				
			||||
insert into  user_group_bez select * from tmp_user_group_bez ; | 
				
			||||
 | 
				
			||||
drop table tmp_userinfo; | 
				
			||||
drop table tmp_user_institution; | 
				
			||||
drop table tmp_user_masken_bez; | 
				
			||||
drop table tmp_user_sachgeb_bez; | 
				
			||||
drop table tmp_user_pw; | 
				
			||||
drop table tmp_user_sichtarten; | 
				
			||||
drop table tmp_user_sichten; | 
				
			||||
drop table tmp_groupinfo; | 
				
			||||
drop table tmp_group_field_pref; | 
				
			||||
drop table tmp_group_masken_bez; | 
				
			||||
drop table tmp_group_sachgeb_bez; | 
				
			||||
drop table tmp_group_sichtarten; | 
				
			||||
drop table tmp_group_sichten; | 
				
			||||
drop table tmp_user_group_bez; | 
				
			||||
 | 
				
			||||
commit; | 
				
			||||
									
										
											File diff suppressed because it is too large
											Load Diff
										
									
								
							
						
									
										Binary file not shown.
									
								
							
						
					Loading…
					
					
				
		Reference in new issue