Browse Source

Initial data model costage

COStage_0.2_Release
Daniel Quathamer 4 years ago
parent
commit
47b883c5c9
  1. 550
      src-modules/module/costage/conf/costage.xml
  2. 10
      src-modules/module/costage/conf/excludes.txt
  3. 3
      src-modules/module/costage/conf/includes.txt
  4. 22
      src-modules/module/costage/masken/43000_felderinfo.unl
  5. 1
      src-modules/module/costage/masken/43000_maske_system_bez.unl
  6. 15
      src-modules/module/costage/masken/43000_masken_felder_bez.unl
  7. 236
      src-modules/module/costage/masken/43000_maskeninfo.unl
  8. 1
      src-modules/module/costage/masken/43000_sachgeb_maske_bez.unl
  9. 343
      src-modules/module/costage/rohdaten/costage_unload.xml
  10. 7685
      src-modules/module/costage/rohdaten/sos_unload_graz_2019.xml
  11. 440
      src-modules/module/costage/schluesseltabellen/fm_templates.unl
  12. 25
      src-modules/module/costage/schluesseltabellen/fm_templates_fuellen.sql
  13. 25
      src-modules/module/costage/schluesseltabellen/fm_templates_unload.x
  14. 16
      src-modules/module/costage/schluesseltabellen/fm_templates_update.x
  15. 14
      src-modules/module/costage/schluesseltabellen/sachgebiete_fuellen.sql
  16. 3
      src-modules/module/costage/schluesseltabellen/sachgebiete_loeschen.sql

550
src-modules/module/costage/conf/costage.xml

@ -0,0 +1,550 @@ @@ -0,0 +1,550 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE module SYSTEM "../../../conf/superx-module.dtd"> -->
<module name="costage" version="0.1" sachgebiet_id="310"
sachgebiet="CO Basisdaten" systeminfo_id="310"
system="CO Basisdaten" thema="CO Basisdaten" thema_parent="Studierende, Prüfungen">
<database name="superx" system="superx">
<sachgebiete>
<sachgebiet id="311" name="CO Basisdaten Administr."
rightname="CS_BIA_STANDARDREPORTS_ADMIN[CO]" />
</sachgebiete>
<!--
<table name="costage_bw_sb_status_werte" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="bw_sb_stat_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="wert" type ="VARCHAR" size ="1" default ="" notnull ="true" />
<column name="name" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
-->
<table name="costage_st_abschlussziele_amtstat" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_absz_amtstat_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="statistik_code" type ="VARCHAR" size ="2" default ="" notnull ="true" />
<column name="name" type ="VARCHAR" size ="150" default ="" notnull ="true" />
<column name="st_land_reg_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="st_std_art_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_abschlussziele_lokal" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_absz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="code" type ="VARCHAR" size ="2" default ="" notnull ="true" />
<column name="name" type ="VARCHAR" size ="200" default ="" notnull ="true" />
<column name="st_absz_amtstat_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_fachsemester" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studium_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_sem_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="fachsemester" type ="DECIMAL" size ="(38,0)" default ="" notnull ="true" />
<column name="fachsemestertyp" type ="VARCHAR" size ="10" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_fakultaeten" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_fakultaeten_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="unikey" type ="VARCHAR" size ="4" default ="" notnull ="true" />
<column name="fakultaet_key" type ="VARCHAR" size ="2" default ="" notnull ="true" />
<column name="fakultaet_bezeichnung" type ="VARCHAR" size ="20" default ="" notnull ="false" />
<column name="fakultaet_name" type ="VARCHAR" size ="70" default ="" notnull ="false" />
<column name="fakultaet_alt" type ="VARCHAR" size ="1" default ="" notnull ="false" />
<column name="fakultaet_last" type ="VARCHAR" size ="3" default ="" notnull ="false" />
<column name="st_land_reg_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_hauptstudien" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_studium_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="st_sem_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_hoererstatus" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_sem_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="hoererstatus_name" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
<column name="hoererstatus_kb" type ="VARCHAR" size ="1" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_laender" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_land_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="name" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
<column name="iso_code_2" type ="VARCHAR" size ="2" default ="" notnull ="false" />
<column name="iso_code_3" type ="VARCHAR" size ="3" default ="" notnull ="false" />
<column name="kurzbezeichnung" type ="VARCHAR" size ="3" default ="" notnull ="true" />
<column name="statistik_code" type ="VARCHAR" size ="5" default ="" notnull ="false" />
<column name="adresse" type ="CHAR" size ="1" default ="" notnull ="false" />
<column name="hzb" type ="CHAR" size ="1" default ="" notnull ="false" />
<column name="staatsbuergerschaft" type ="CHAR" size ="1" default ="" notnull ="false" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_land_regionen" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_land_reg_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
<column name="statistik_code" type ="VARCHAR" size ="5" default ="" notnull ="false" />
<column name="st_land_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_personen" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="matrikelnummer" type ="VARCHAR" size ="12" default ="" notnull ="false" />
<column name="vorname" type ="VARCHAR" size ="255" default ="" notnull ="true" />
<column name="vorname_komplett" type ="VARCHAR" size ="255" default ="" notnull ="false" />
<column name="familienname" type ="VARCHAR" size ="255" default ="" notnull ="true" />
<column name="geburtsdatum" type ="DATETIME" size ="7" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_semester" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_sem_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="semester_id" type ="VARCHAR" size ="3" default ="" notnull ="true" />
<column name="semester_anfang" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="semester_ende" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="semester_bezeichnung" type ="VARCHAR" size ="22" default ="" notnull ="true" />
<column name="studienjahr" type ="VARCHAR" size ="20" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studienarten" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_std_art_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="kurzbezeichnung" type ="VARCHAR" size ="10" default ="" notnull ="true" />
<column name="name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studienfaecher" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_stdfach_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
<column name="statistik_code" type ="VARCHAR" size ="3" default ="" notnull ="true" />
<column name="st_land_reg_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studiengaenge_mtsg" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studiengang_nr_msg" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_studiengang_nr_tsg" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studienfach_sortierung" type ="INTEGER" size ="8" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studiengaenge" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studiengangs_identifikator" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
<column name="studiengangs_bezeichnung" type ="VARCHAR" size ="4000" default ="" notnull ="false" />
<column name="st_absz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_skz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="fachkennzeichen" type ="VARCHAR" size ="10" default ="" notnull ="false" />
<column name="st_std_art_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studiengangs_typ_name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
<column name="studiengangs_typ_kb" type ="VARCHAR" size ="10" default ="" notnull ="false" />
<column name="studientyp_name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
<column name="studientyp_kb" type ="VARCHAR" size ="10" default ="" notnull ="true" />
<column name="stp_stp_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studienkennzahlen" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_skz_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="skz_key" type ="VARCHAR" size ="4" default ="" notnull ="true" />
<column name="unikey" type ="VARCHAR" size ="4" default ="" notnull ="true" />
<column name="fakultaet_key" type ="VARCHAR" size ="2" default ="" notnull ="false" />
<column name="skz_name" type ="VARCHAR" size ="40" default ="" notnull ="false" />
<column name="st_stdfach_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="gesetzliche_grundlage_kb" type ="VARCHAR" size ="10" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studienstatus" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studienstatus_nr" type ="DECIMAL" size ="(38,0)" default ="" notnull ="true" />
<column name="st_studium_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studienstatustyp" type ="VARCHAR" size ="240" default ="" notnull ="true" />
<column name="beginn_datum" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="gueltig_ab" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="st_sem_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studien_spoversionen" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studium_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="stp_stp_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="gueltig_ab" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="po_stp_stp_version_kb" type ="VARCHAR" size ="10" default ="" notnull ="false" />
<column name="po_regelstudienzeit" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="po_gueltig_ab" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="po_gueltig_bis" type ="DATETIME" size ="7" default ="" notnull ="false" />
<column name="po_studierbar_bis" type ="DATETIME" size ="7" default ="" notnull ="false" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studien" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studium_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_studiengang_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="studienform_name" type ="VARCHAR" size ="100" default ="" notnull ="false" />
<column name="studienform_statistik_code" type ="VARCHAR" size ="2" default ="" notnull ="false" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<table name="costage_st_studierendenstammdaten" thema="Studierende" typ="Datentabelle" releaseUnload="empty">
<columns><column name="st_studstamm_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="matrikelnummer" type ="VARCHAR" size ="12" default ="" notnull ="false" />
<column name="vorname" type ="VARCHAR" size ="255" default ="" notnull ="true" />
<column name="familienname" type ="VARCHAR" size ="255" default ="" notnull ="true" />
<column name="geburtsdatum" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="geschlecht" type ="VARCHAR" size ="1" default ="" notnull ="false" />
<column name="st_land1_nr" type ="INTEGER" size ="8" default ="" notnull ="true" />
<column name="st_land2_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="geburt_st_land_nr" type ="INTEGER" size ="8" default ="" notnull ="false" />
<column name="personentyp_name" type ="VARCHAR" size ="100" default ="" notnull ="true" />
<column name="personentyp_kb" type ="VARCHAR" size ="10" default ="" notnull ="true" />
<column name="aufnahmedatum" type ="DATETIME" size ="7" default ="" notnull ="true" />
<column name="abmeldungsdatum" type ="DATETIME" size ="7" default ="" notnull ="false" />
</columns>
<indexes></indexes>
<primaryKeys><rs>
</rs></primaryKeys>
<foreignKeys><rs>
</rs></foreignKeys>
</table>
<views>
</views>
<functions>
</functions>
<themen>
<thema name="Administration CO Basisdaten"
parent="CO Basisdaten">Abfragen zur Administration CO Basisdaten</thema>
</themen>
<masken>
<maske tid="43000" name="Studierende (Zeitreihe)" thema="CO Basisdaten">
<description>Studierende Zeitreihe</description>
<src>
<path>$COSTAGE_PFAD/masken</path>
</src>
</maske>
</masken>
<data-integrity>
</data-integrity>
</database>
<!-- ********************* Liste der ETL-Prozesse ************************** -->
<etl>
<etl-step name="Load" type="load">
<action>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_abschlussziele_amtstat"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_abschlussziele_amtstat.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_abschlussziele_lokal"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_abschlussziele_lokal.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_fachsemester"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_fachsemester.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_fakultaeten"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_fakultaeten.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_hauptstudien"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_hauptstudien.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_hoererstatus"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_hoererstatus.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_laender"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_laender.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_land_regionen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_land_regionen.unl"/></loadtable>
<!--<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_personen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_personen.unl"/></loadtable>-->
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_semester"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_semester.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienarten"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienarten.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienfaecher"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienfaecher.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studiengaenge_mtsg"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studiengaenge_mtsg.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studiengaenge"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studiengaenge.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienkennzahlen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienkennzahlen.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studienstatus"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studienstatus.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studien_spoversionen"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studien_spoversionen.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studien"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studien.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="costage_st_studierendenstammdaten"><file path="$COSTAGE_LOAD_PFAD/unl/costage_st_studierendenstammdaten.unl"/></loadtable>
</action>
</etl-step>
<etl-step name="Transformation" type="trans">
<action>
</action>
</etl-step>
</etl>
<install>
<install-step name="Füllen der Modul-Tabellen">
<action error="stop">
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
<!--<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sx_jobs_fuellen.sql" database=""/>-->
</action>
</install-step>
</install>
<upgrade>
<upgrade-step>
<action error="stop">
<nativeaction sql="create table tmp_templates(tid integer,
id char(200) not null,
content text not null,
description char(200) ,
comment char(200) ,
version integer
)
;" database=""/>
</action>
<action error="stop">
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_templates"><file path="$COSTAGE_PFAD/schluesseltabellen/fm_templates.unl"/></loadtable>
</action>
<action>
<loadtable refresh="true" delimiter="^" header="false" tabname="co_step_type"><file path="$COSTAGE_PFAD/schluesseltabellen/co_step_type.unl"/></loadtable>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/co_step_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
</action>
</upgrade-step>
</upgrade>
<uninstall-step name="Deinstalliere Schlüssel">
<action error="stop">
<nativeaction sql="" scriptfile="$COSTAGE_PFAD/schluesseltabellen/sachgebiete_loeschen.sql" database=""/>
</action>
</uninstall-step>
<!-- ********************* Liste der ETL-Prozesse ************************** -->
<dbforms>
<form name="co_job_edit"
table="co_job"
path="/edit/co/co_job_edit.jsp"
followUp=""
caption="Laderoutinen verwalten"
orderBy="caption"
gotoHt=""
helpfile=""
maxRows="1"
mode="update_insert_delete_copy">
<description>In diesem Formular können Sie Laderoutinen verwalten.</description>
<filters>
<filter mandatory="true" type="equals">tid</filter>
</filters>
<field-selection complete="false" />
<customfield name="tid" />
<customfield name="caption" visibleSize="50" nullFieldValue="" />
<customfield name="uniquename" visibleSize="50" nullFieldValue="" />
<customfield name="custom_job" visibleSize="50" nullFieldValue="" />
<customfield name="systeminfo_id" visibleSize="50" nullFieldValue="" />
<customfield name="Parameter" type="subform" multipart="false" autoUpdate="false"
maxRows="*" table="co_job_param" parentField="tid" childField="co_job_id"
orderBy="sortnr" allowNew="true"
mode="full">
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="job_id" type="hidden" overrideValue="tid" />
<customfield name="name" nullFieldValue="" visibleSize="30" />
<customfield name="uniquename" visibleSize="50" nullFieldValue="" />
<customfield name="param_default" nullFieldValue="" visibleSize="30" />
</customfield>
<customfield name="Ladeschritte" type="subform" multipart="false" autoUpdate="false"
maxRows="*" table="co_step_relation" parentField="tid" childField="job_id"
orderBy="sortnr" allowNew="true"
mode="full">
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="job_id" type="hidden" overrideValue="tid" />
<customfield name="step_id" nullFieldValue="" visibleSize="30" />
<customfield name="parent_step_id" nullFieldValue="" visibleSize="30" />
<customfield name="force_continue" nullFieldValue="" pattern="" visibleSize="10" />
<customfield name="step_active" nullFieldValue="" pattern="" visibleSize="20" />
<customfield name="sortnr" nullFieldValue="" pattern="" visibleSize="20" />
<customfield name="custom_step" nullFieldValue="" pattern="" visibleSize="20" />
<customfield type="link" name="Details" path="/superx/edit/co/co_step_edit.jsp" linkVar="tid" linkid="step_id"/>
</customfield>
</form>
<form name="co_step_edit"
table="co_step"
path="/edit/co/co_step_edit.jsp"
followUp=""
caption="Ladeschritt verwalten"
orderBy=""
gotoHt=""
helpfile=""
maxRows="1"
mode="full">
<description>In diesem Formular können Sie Ladeschritte verwalten.</description>
<filters>
<filter mandatory="true" type="equals">tid</filter>
</filters>
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="caption" nullFieldValue="" visibleSize="30" />
<customfield name="uniquename" nullFieldValue="" visibleSize="30" />
<customfield name="systeminfo_id" nullFieldValue="" pattern="" visibleSize="10" />
<customfield name="step_type_id" nullFieldValue="" pattern="" visibleSize="20" />
<customfield name="custom_step" nullFieldValue="" pattern="" visibleSize="30" />
<customfield name="logfile" nullFieldValue="" pattern="" visibleSize="20" />
<customfield name="Eigenschaften" type="subform" multipart="false" autoUpdate="false"
maxRows="*" table="co_step_property" parentField="tid" childField="co_step_id"
orderBy="prop_name" allowNew="true"
mode="full">
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="co_step_id" type="hidden" overrideValue="tid" />
<customfield name="prop_name" nullFieldValue="" visibleSize="30" />
<customfield name="prop_value" visibleSize="50" nullFieldValue="" />
</customfield>
</form>
<form name="co_step_type_list"
table="co_step_type"
path="/edit/co/co_step_type_list.jsp"
followUp=""
caption="Arten von Ladeschritten verwalten"
orderBy="caption"
gotoHt=""
helpfile=""
maxRows="*"
mode="full">
<description>In diesem Formular können Sie Arten von Ladeschritten verwalten.</description>
<filters>
</filters>
<field-selection complete="true" />
</form>
</dbforms>
</module>

10
src-modules/module/costage/conf/excludes.txt

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
rohdaten/COSTAGE_ENV
rohdaten/*.properties
preparation.sql
finalize.sql
rohdaten/*.err
*.log
*.err
rohdaten/unl/*
conf/customize.sql
conf/*.log

3
src-modules/module/costage/conf/includes.txt

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
doku/costage_modul/costage.html
WEB-INF/conf/edustore/db/bin/SQL_ENV_costage.sam

22
src-modules/module/costage/masken/43000_felderinfo.unl

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
43000^Köpfe oder Fälle ?^-3^0^0^130^150^1^sql^30^1^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle;^hidden^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Köpfe';^
43001^Seit Semester^1^0^0^130^80^1^integer^30^1^1^<<SQL>> select val('20' || replace(replace(semester_id,'S','1'),'W','2')) as semester_tid,semester_bezeichnung FROM costage_st_semester\
order by 1 DESC;^^<<SQL>> select val('20' || replace(replace(semester_id,'S','1'),'W','2')) as semester_tid,semester_bezeichnung FROM costage_st_semester\
where today()-(5*365) between semester_anfang and semester_ende;^
43002^Fächer^3^0^0^130^200^6^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^hidden^^
43003^bis Fachsemester^23^330^-1^130^100^1^integer^30^0^0^^hidden^^
43004^Hörerstatus^18^0^0^130^150^1^sql^30^0^1^<<SQL>> select apnr, eintrag from hoererstatus order by 2^hidden^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^
43005^Stichtag^-2^330^-1^130^100^1^sql^30^1^1^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^hidden^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^
43006^Status^19^330^-1^130^180^1^sql^30^0^1^<<SQL>> select apnr,eintrag from sos_status order by 2^ ^<<SQL>> select apnr,eintrag from sos_status where eintrag='Alle ohne Beurl.';^
43007^Bis Semester^2^330^-1^130^100^1^integer^30^0^1^<<SQL>> select val('20' || replace(replace(semester_id,'S','1'),'W','2')) as semester_tid,semester_bezeichnung FROM costage_st_semester\
order by 1 DESC;^Eintrag^<<SQL>> select val('20' || replace(replace(semester_id,'S','1'),'W','2')) as semester_tid,semester_bezeichnung FROM costage_st_semester\
where today() between semester_anfang and semester_ende;^
43008^Abschluss^8^0^0^130^150^5^char^30^0^1^<<SQL>> select apnr, trim(druck) || ' (' || trim(apnr) || ')' from cifx where key = 35 order by 2;^hidden^^
43009^Fachkennz.^9^330^-1^130^150^1^char^30^0^1^<<SQL>> select apnr,druck from sos_k_kzfa order by 2^hidden^^
43010^Vertiefung^4^330^-1^130^100^1^char^30^0^1^<<SQL>> select apnr,druck from cifx where key=39 order by 2;^hidden^^
43011^ab Fachsemester^22^0^0^130^100^1^integer^30^0^0^^hidden^^
43012^Filter Studierende^120^0^0^130^150^1^sql^20^0^1^<<SQL>> SELECT content,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SOS_STUD_FILTER' order by 2;^hidden^^
43013^Trennen nach^121^330^-1^130^100^1^char^20^0^1^<<SQL>> \
select 'Fach' from xdummy \
union \
select 'Abschluss' from xdummy^hidden^^
43014^Studiengang^6^0^0^130^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^hidden^^

1
src-modules/module/costage/masken/43000_maske_system_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
43000^310^

15
src-modules/module/costage/masken/43000_masken_felder_bez.unl

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
43000^43000^
43000^43001^
43000^43002^
43000^43003^
43000^43004^
43000^43005^
43000^43006^
43000^43007^
43000^43008^
43000^43009^
43000^43010^
43000^43011^
43000^43012^
43000^43013^
43000^43014^

236
src-modules/module/costage/masken/43000_maskeninfo.unl

@ -0,0 +1,236 @@ @@ -0,0 +1,236 @@
43000^Studierende (Zeitreihe) CO Basisdaten^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
<#if "<<Köpfe oder Fälle ?>>"?index_of("S.gewichtung") != -1 ||"<<Köpfe oder Fälle ?>>"?index_of("gew") != -1 || "<<Köpfe oder Fälle ?>>"?index_of("vzae") != -1 || "<<Köpfe oder Fälle ?>>"?index_of("ffaelle") != -1>\
<#assign feldtyp="decimal(21,9)" />\
<#else>\
<#assign feldtyp="integer" />\
</#if>\
\
<#assign lehr_stg_ab="lehr_stg_ab"/>\
<#assign quelltabelle='sos_stg_aggr'/>\
<#if "<<Köpfe oder Fälle ?>>"?index_of("S.gewichtung_id=")!=-1>\
<#assign lehr_stg_ab="lehr_stg_ab_gew"/>\
<#assign quelltabelle='sos_stud_gewichtung'/>\
</#if>\
\
/* <#assign extension= <<Trennen nach>> > */\
\
create temp table tmp_studis1 \
(semester integer,\
semester_bezeichnung varchar(255),\
semester_sort varchar(10),\
m_1fs ${feldtyp}, \
w_1fs ${feldtyp},\
gesamt_1fs ${feldtyp},\
m_gesamt ${feldtyp},\
w_gesamt ${feldtyp},\
gesamt ${feldtyp}\
)\
<@informixnolog/>;\
\
create temp table tmp_studis2\
(semester integer,\
semester_bezeichnung varchar(255),\
semester_sort varchar(10),\
m_1fs ${feldtyp}, \
w_1fs ${feldtyp},\
gesamt_1fs ${feldtyp},\
m_gesamt ${feldtyp},\
w_gesamt ${feldtyp},\
gesamt ${feldtyp}\
)\
<@informixnolog/>;\
\
--zun. temp. Tabelle\
SELECT\
val('20' || replace(replace(SEM.semester_id,'S','1'),'W','2')) as semester,\
SEM.semester_id as semester_sort,\
SEM.semester_bezeichnung,\
G.stp_stp_nr as studeingang_nr ,--substr(F.stgnr,1,1), TODO paßt das?\
F.st_stdfach_nr as fach_nr,--substr(F.stgnr,length(F.stgnr),1),\
ST.studienstatustyp as status,\
FS.fachsemester as fach_sem_zahl,\
H.hoererstatus_kb as hrst,\
V.studienform_statistik_code as stufrm,\
ST.gueltig_ab as ruebeudat, --TODO: jeweils letzten Datensatz pro Semester\
ST.gueltig_ab as endedat,--TODO: jeweils letzten Datensatz pro Semester\
ST.gueltig_ab as anfdat,--TODO: jeweils letzten Datensatz pro Semester\
'H' as primaerfach,\
F.unikey,\
S.geschlecht,\
count(*) as summe\
into temp tmp_studien\
from \
costage_st_hoererstatus H,\
costage_st_studierendenstammdaten S,\
costage_st_studienstatus ST,\
costage_st_studiengaenge G,\
costage_st_studienkennzahlen F,\
costage_st_abschlussziele_lokal A,\
costage_st_fachsemester FS,\
costage_st_semester SEM,\
costage_st_studien V ,\
costage_st_hauptstudien K\
where \
K.st_studium_nr=V.st_studium_nr\
and SEM.st_sem_nr=K.st_sem_nr\
and F.st_skz_nr=G.st_skz_nr\
and V.st_studiengang_nr=G.st_studiengang_nr\
and FS.st_studium_nr=V.st_studium_nr\
and SEM.st_sem_nr=FS.st_sem_nr\
and FS.fachsemestertyp='FS' --TODO: klin.Semester=KS\
and G.st_absz_nr=A.st_absz_nr\
and S.st_studstamm_nr=V.st_studstamm_nr\
and H.st_studstamm_nr=S.st_studstamm_nr\
and H.st_sem_nr=SEM.st_sem_nr\
and ST.st_studium_nr=V.st_studium_nr\
and ST.st_sem_nr=SEM.st_sem_nr\
and date(SEM.semester_anfang) >= date_val('01.01.2000')\
--and S.matrikelnummer='7344750'\
--and SEM.st_sem_nr=178\
and val('20' || replace(replace(SEM.semester_id,'S','1'),'W','2')) >= <<Seit Semester>>\
/* and val('20' || replace(replace(SEM.semester_id,'S','1'),'W','2')) <= <<Bis Semester>> */\
\
group by 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\
\
--AND F.semester >= $start_stud_sem\
;\
\
insert into tmp_studis1(semester ,\
semester_bezeichnung,\
semester_sort,\
m_1fs, \
w_1fs,\
gesamt_1fs,\
m_gesamt ,\
w_gesamt ,\
gesamt)\
\
select semester,\
semester_bezeichnung,\
semester_sort,\
(case when geschlecht='M' and fach_sem_zahl=1 then summe else 0 end) as m_1fs,\
(case when geschlecht='W' and fach_sem_zahl=1 then summe else 0 end) as w_1fs,\
(case when fach_sem_zahl=1 then summe else 0 end) as gesamt_1fs,\
(case when geschlecht='M' then summe else 0 end) as m_gesamt,\
(case when geschlecht='W' then summe else 0 end) as w_gesamt,\
summe\
from tmp_studien S\
--group by semester,semester_bezeichnung,semester_sort, geschlecht,fach_sem_zahl\
; \
\
\
\
insert into tmp_studis2(semester ,\
semester_bezeichnung,\
semester_sort,\
m_1fs , \
w_1fs ,\
gesamt_1fs,\
m_gesamt ,\
w_gesamt,\
gesamt)\
\
select semester ,\
semester_bezeichnung,\
semester_sort,\
sum(m_1fs ), \
sum(w_1fs ),\
sum(gesamt_1fs),\
sum(m_gesamt) ,\
sum(w_gesamt),\
sum(gesamt)\
from tmp_studis1\
group by 1,2,3;\
\
\
update tmp_studis2\
set gesamt = null where gesamt = 0;\
update tmp_studis2\
set gesamt_1fs = null where gesamt_1fs = 0;\
update tmp_studis2\
set w_gesamt = null where w_gesamt = 0;\
\
\
<@selectintotmp \
select="semester ,\
semester_bezeichnung,\
semester_sort,\
m_1fs , \
w_1fs ,\
gesamt_1fs,\
m_gesamt ,\
w_gesamt,\
gesamt"\
source="tmp_studis2"\
target="tmp_studis">\
order by semester_sort desc\
</@selectintotmp>\
<@informixnolog/>;\
\
\
-- insert into tmp_studis (eintrag)\
-- values ("");\
\
\
drop table tmp_studis1;\
drop table tmp_studis2;\
drop table tmp_studien;\
\
-- Falls Division durch 0 vorkommen sollte, Division durch NULL ist möglich\
\
select semester_bezeichnung, \
gesamt,\
gesamt_1fs, \
round((100*gesamt_1fs)::decimal(21,9)/gesamt,2),\
'',\
w_gesamt, round((100*w_gesamt)::decimal(21,9)/gesamt,2),\
w_1fs, round((100*w_1fs)::decimal(21,9)/gesamt_1fs,2)\
from tmp_studis \
order by semester_sort desc \
;^--Freemarker Template\
/* <#assign extension= <<Trennen nach>> > */\
\
XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
drop_and_delete movable_columns\
min_heading_height=55\
Column CID=0 heading_text="@@sos_semester@@" explanation="@@@sos_semester@@@" center_heading\
row_selectable heading_platform readonly\
width=10\
Column CID=1 heading_text="Gesamt-\
zahl" explanation="@@@sos_gesamtzahl@@@" center_heading\
row_selectable col_selectable rightJust heading_platform\
readonly\
width=8\
Column CID=2 heading_text="1. @@FS@@\
gesamt" explanation="@@@sos_1fs_ges@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=8\
Column CID=3 heading_text="1. @@FS@@\
in %" explanation="@@@sos_1fs_proz@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=8\
Column CID=6 heading_text=" " explanation="" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=1\
Column CID=7 heading_text="dar.\
Frauen" explanation="@@@sos_frauen_sem@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=8\
Column CID=8 heading_text="Frauen\
in %" explanation="@@@sos_frauen_proz@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=8\
Column CID=9 heading_text="1. @@FS@@\
Frauen" explanation="@@@sos_frauen_1fs@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=8\
Column CID=10 heading_text="1. @@FS@@\
Frauen\
in %" explanation="@@@sos_frauen_1fs_proz@@@" center_heading\
row_selectable col_selectable rightJust heading_platform readonly\
width=8\
@@@^Semester^Anzahl^Zeitreihe zur Anzeige des Datenbestandes aus CO^drop table tmp_studis;^-leer-^2^700^360^0^1^^

1
src-modules/module/costage/masken/43000_sachgeb_maske_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
310^43000^

343
src-modules/module/costage/rohdaten/costage_unload.xml

@ -0,0 +1,343 @@ @@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<superx-unload version="4.0">
<module id="costage" version="0.1b" systeminfo_id="310">COSTAGE-Modul</module>
<parameters>
<param name="COSTAGE_UNL_COMPLETE" defaultValue="true" description="Komplett entladen"><comment>Sollen alle Datensätze entladen werden, oder nur die geänderten?(true,false).</comment></param>
<param name="VERSION" defaultValue="2" description="Datenbank-Version"><comment>CO-Version, möglich sind 2,3. </comment></param>
<param name="start_costage_stud_sem" defaultValue="19911" description="Startsemester Studierende"><comment>Ab welchem Semester sollen Studierende entladen werden? z.B. 20011 für SS 2001</comment></param>
<param name="start_costage_pruef_sem" defaultValue="19911" description="Startsemester Prüfungen"><comment>Ab welchem Semester sollen Prüfungen entladen werden? z.B. 20021 für SS 2002</comment></param>
<param name="COSTAGE_UNL_ANON" defaultValue="false" description="Pseudonymisierung"><comment>Matrikelnummern pseudonymisieren (true, false). Muss bei Datenquelle HISinOne auf "false" gesetzt sein.</comment></param>
<param name="COSTAGE_PNR" defaultValue="0" ><comment>Welche Prüfungsnummern (Vor- Hauptprüfun../../../superx/WEB-INF/web.xmlgen) sollen entladen werden? Wird bei Datenquelle HISinOne nicht ausgewertet.</comment></param>
<param name="COSTAGE_STUDENT_FILTER" defaultValue=" AND 1=1 " ><comment>Filter für Studierende, um z.B. Teststudenten nicht zu entladen (nur HISinOne).</comment></param>
</parameters>
<sourcesystems>
<sourcesystem name="co" description="CampusOnline-Datenbank" default="true"/>
</sourcesystems>
<unload-job id="costage_st_abschlussziele_amtstat" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_amtstat.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_absz_amtstat_nr,
statistik_code,
name,
st_land_reg_nr,
st_std_art_nr
FROM px_st_abschlussziele_amtstat_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_abschlussziele_lokal" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_lokal.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_absz_nr,
code,
name,
st_absz_amtstat_nr
FROM px_st_abschlussziele_lokal_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_fachsemester" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_fachsemester.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studium_nr,
st_sem_nr,
fachsemester,
fachsemestertyp
FROM px_st_fachsemester_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_fakultaeten" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_fakultaeten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_fakultaeten_nr,
unikey,
fakultaet_key,
fakultaet_bezeichnung,
fakultaet_name,
fakultaet_alt,
fakultaet_last,
st_land_reg_nr
FROM px_st_fakultaeten_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_hauptstudien" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_hauptstudien.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studstamm_nr,
st_studium_nr,
st_sem_nr
FROM px_st_hauptstudien_v
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_hoererstatus" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_hoererstatus.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studstamm_nr,
st_sem_nr,
hoererstatus_name,
hoererstatus_kb
FROM px_st_hoererstatus_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_laender" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_laender.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_land_nr,
name,
iso_code_2,
iso_code_3,
kurzbezeichnung,
statistik_code,
adresse,
hzb,
staatsbuergerschaft
FROM px_st_laender_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_land_regionen" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_land_regionen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_land_reg_nr,
name,
statistik_code,
st_land_nr
FROM px_st_land_regionen_v
;
]]>
</extraction-sql>
</unload-job>
<!--
<unload-job id="costage_st_personen" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_personen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT nr,
matrikelnummer,
vorname,
vorname_komplett,
familienname,
geburtsdatum
FROM px_st_personen_v
;
]]>
</extraction-sql>
</unload-job>-->
<unload-job id="costage_st_semester" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_semester.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_sem_nr,
semester_id,
semester_anfang,
semester_ende,
semester_bezeichnung,
studienjahr
FROM px_st_semester_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studien" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studien.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studium_nr,
st_studstamm_nr,
st_studiengang_nr,
studienform_name,
studienform_statistik_code
FROM px_st_studien_v
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studien_spoversionen" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studien_spoversionen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studium_nr,
stp_stp_nr,
gueltig_ab,
po_stp_stp_version_kb,
po_regelstudienzeit,
po_gueltig_ab,
po_gueltig_bis,
po_studierbar_bis
FROM px_st_studien_spoversionen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studienarten" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienarten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_std_art_nr,
kurzbezeichnung,
name
FROM px_st_studienarten_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studienfaecher" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienfaecher.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_stdfach_nr,
name,
statistik_code,
st_land_reg_nr
FROM px_st_studienfaecher_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studiengaenge" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studiengang_nr,
studiengangs_identifikator,
studiengangs_bezeichnung,
st_absz_nr,
st_skz_nr,
fachkennzeichen,
st_std_art_nr,
studiengangs_typ_name,
studiengangs_typ_kb,
studientyp_name,
studientyp_kb,
stp_stp_nr
FROM px_st_studiengaenge_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studiengaenge_mtsg" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge_mtsg.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studiengang_nr_msg,
st_studiengang_nr_tsg,
studienfach_sortierung
FROM px_st_studiengaenge_mtsg_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studienkennzahlen" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienkennzahlen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_skz_nr,
skz_key,
unikey,
fakultaet_key,
skz_name,
st_stdfach_nr,
gesetzliche_grundlage_kb
FROM px_st_studienkennzahlen_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studienstatus" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienstatus.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studienstatus_nr,
st_studium_nr,
studienstatustyp,
beginn_datum,
gueltig_ab,
st_sem_nr
FROM px_st_studienstatus_v
;
]]>
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studierendenstammdaten" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studierendenstammdaten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
SELECT st_studstamm_nr,
matrikelnummer,
vorname,
familienname,
geburtsdatum,
geschlecht,
st_land1_nr,
st_land2_nr,
geburt_st_land_nr,
personentyp_name,
personentyp_kb,
aufnahmedatum,
abmeldungsdatum
FROM px_st_studierendenstammdaten_v
;
]]>
</extraction-sql>
</unload-job>
</superx-unload>

7685
src-modules/module/costage/rohdaten/sos_unload_graz_2019.xml

File diff suppressed because it is too large Load Diff

440
src-modules/module/costage/schluesseltabellen/fm_templates.unl

@ -0,0 +1,440 @@ @@ -0,0 +1,440 @@
216^ETL_MAKROS^<#macro ETL_STEPS_FUELLEN>\
\
\
create temp table tmp_etl_step(\
tid INTEGER, \
uniquename VARCHAR(255) , \
caption VARCHAR(255) , \
systeminfo_id INTEGER not null, \
step_type INTEGER, \
step_type_uniquename VARCHAR(255), \
sortnr SMALLINT not null, \
force_continue SMALLINT,\
etl_job_id INTEGER , \
parent_step_id INTEGER , \
parent_step_uniquename varchar(255),\
parent_job_uniquename varchar(255),\
logfile varchar(255),\
custom_step smallint,\
already_exists smallint\
) \
;\
\
create temp table tmp_etl_job(\
tid INTEGER, \
uniquename VARCHAR(255) , \
caption VARCHAR(255) , \
systeminfo_id INTEGER not null,\
logfile varchar(255),\
already_exists smallint,\
custom_job smallint\
) \
;\
\
create temp table tmp_etl_job_param(\
tid SERIAL not null, \
etl_job_id INTEGER , \
uniquename VARCHAR(255) not null, \
name VARCHAR(255) , \
param_default VARCHAR(255) \
) \
;\
\
\
create temp table tmp_etl_step_property(\
tid SERIAL not null, \
etl_step_id INTEGER not null, \
prop_name VARCHAR(255) , \
prop_value text\
\
) \
;\
\
create temp table tmp_etl_step_relation(\
tid SERIAL not null, \
step_id INTEGER not null, \
parent_step_id INTEGER , \
job_id INTEGER not null, \
force_continue SMALLINT default 1 , \
step_active SMALLINT default 1, \
sortnr SMALLINT default 1,\
custom_step SMALLINT default 1\
\
) \
;\
\
<#foreach etl_job in etl_jobs>\
\
truncate table tmp_etl_job;\
truncate table tmp_etl_step;\
truncate table tmp_etl_job_param;\
truncate table tmp_etl_step_property;\
truncate table tmp_etl_step_relation;\
\
--tids der jobs dürfen sich nicht ändern, daher \
--\
-- 1. vorh. Jobs updaten\
-- 2. neue Jobs einfügen\
-- 3. alte Jobs löschen\
\
insert into tmp_etl_job(uniquename,caption,systeminfo_id,logfile,already_exists,custom_job)\
values ('${etl_job.uniquename}',\
'${etl_job.name}',\
${etl_job.systeminfo_id},\
'${etl_job.logfile}',0,0);\
\
<#if SQLdialect='Postgres'>\
--Postgres Dialekt:\
\
update tmp_etl_job set tid=J.tid,\
already_exists=1,\
caption=J.caption,\
logfile=J.logfile,\
custom_job=J.custom_job\
from etl_job J where J.uniquename=tmp_etl_job.uniquename\
and J.systeminfo_id=tmp_etl_job.systeminfo_id\
;\
\
<#else>\
\
--Informix Dialekt:\
update tmp_etl_job set (tid,\
already_exists,\
caption,\
logfile,\
custom_job) \
= ((select \
tid,\
1 as already_exists,\
caption,\
logfile,\
custom_job\
from etl_job J where J.uniquename=tmp_etl_job.uniquename\
and J.systeminfo_id=tmp_etl_job.systeminfo_id))\
where 0 <(select count(*)\
from etl_job J where J.uniquename=tmp_etl_job.uniquename\
and J.systeminfo_id=tmp_etl_job.systeminfo_id)\
\
;\
\
</#if>\
\
\
\
--TODO Informix\
\
--neue jobs:\
insert into etl_job(uniquename,caption,systeminfo_id,custom_job)\
select uniquename,caption,systeminfo_id,custom_job\
from tmp_etl_job\
where already_exists=0;\
--tid von neuen Jobs ermitteln:\
update tmp_etl_job set tid=(select J.tid\
from etl_job J where J.uniquename=tmp_etl_job.uniquename\
and J.systeminfo_id=tmp_etl_job.systeminfo_id)\
where already_exists=0\
;\
\
--TODO\
--obsolete Jobs: sollen bei Deinstallation des Moduls entfernt werden\
\
\
--Parameter:\
<#foreach etl_job_param in etl_job_params>\
<#if etl_job_param.etl_job==etl_job.uniquename>\
\
insert into tmp_etl_job_param(\
etl_job_id , \
uniquename, \
name , \
param_default)\
select J.tid,\
'${etl_job_param.param_name}',\
'${etl_job_param.name}',\
'${etl_job_param.param_default}'\
from tmp_etl_job J\
;\
</#if>\
</#foreach>\
\
\
\
--ETL-Schritte \
<#assign sortnr=0 />\
<#foreach etl_step in etl_steps>\
<#if etl_step.etl_job==etl_job.uniquename>\
\
<#assign sortnr=sortnr+1 />\
\
insert into tmp_etl_step(\
uniquename , \
caption , \
systeminfo_id , \
step_type_uniquename,\
sortnr, \
force_continue,\
etl_job_id , \
parent_step_uniquename,\
parent_job_uniquename,\
logfile,\
custom_step,\
already_exists\
)\
select '${etl_step.uniquename}',\
'${etl_step.name}',\
${etl_job.systeminfo_id},\
'${etl_step.type}' as step_type_uniquename,\
${sortnr}*10 as sortnr,\
0 as force_continue,\
J.tid as etl_job_id,\
<#if etl_step.parent?exists && etl_step.parent !="" >\
'${etl_step.parent}',\
<#else>\
'' as parent_step_uniquename,\
</#if>\
J.uniquename,\
'${etl_job.logfile}' as logfile,\
0,\
0\
from etl_job J\
where J.uniquename='${etl_job.uniquename}'\
and J.systeminfo_id=${etl_job.systeminfo_id};\
\
\
\
\
</#if> --Ende steps eines job\
</#foreach>\
\
--erst job-params einfügen:\
\
delete from etl_job_param\
where etl_job_id in (\
SELECT distinct \
etl_job_id\
FROM tmp_etl_job_param )\
;\
\
insert into etl_job_param\
(\
etl_job_id,\
uniquename,\
name,\
param_default\
)\
SELECT \
etl_job_id,\
uniquename,\
name,\
param_default\
FROM tmp_etl_job_param \
;\
\
--nun steps einfügen:\
\
\
update tmp_etl_step set step_type=(select T.tid from etl_step_type T\
where T.uniquename=tmp_etl_step.step_type_uniquename);\
\
select * from tmp_etl_step\
where step_type is null;--_uniquename from tmp_etl_step;\
\
\
--vorhandene Steps erkennen:\
<#if SQLdialect='Postgres'>\
--Postgres Dialekt:\
\
update tmp_etl_step set tid=S.tid,\
already_exists=1,\
caption=S.caption,\
logfile=S.logfile,\
custom_step=S.custom_step\
from etl_step S where S.uniquename=tmp_etl_step.uniquename\
and S.systeminfo_id=tmp_etl_step.systeminfo_id\
;\
<#else>\
\
--Informix Dialekt:\
update tmp_etl_step set (tid,\
already_exists,\
caption,\
logfile,\
custom_step) \
= ((select \
tid,\
1 as already_exists,\
caption,\
logfile,\
custom_step\
from etl_step S where S.uniquename=tmp_etl_step.uniquename\
and S.systeminfo_id=tmp_etl_step.systeminfo_id))\
where 0 <(select count(*)\
from etl_step S where S.uniquename=tmp_etl_step.uniquename\
and S.systeminfo_id=tmp_etl_step.systeminfo_id)\
;\
\
\
\
</#if>\
\
\
--neue Steps einfügen:\
insert into etl_step(\
uniquename,\
caption,\
systeminfo_id,\
step_type_id,\
logfile,\
custom_step)\
select \
uniquename,\
caption,\
systeminfo_id,\
step_type,\
logfile,\
custom_step\
FROM tmp_etl_step \
where already_exists=0\
;\
\
--tid von neuen steps ermitteln:\
update tmp_etl_step set tid=(select S.tid\
from etl_step S where S.uniquename=tmp_etl_step.uniquename\
and S.systeminfo_id=tmp_etl_step.systeminfo_id)\
where already_exists=0\
;\
\
--parent ermitteln:\
update tmp_etl_step set parent_step_id=(select S.tid\
from etl_step S where S.uniquename=tmp_etl_step.parent_step_uniquename\
and S.systeminfo_id=tmp_etl_step.systeminfo_id)\
;\
\
\
delete from etl_step_property\
where etl_step_id in (select T.tid\
FROM tmp_etl_step T )\
;\
delete from etl_step_relation\
where job_id in (select J.tid\
FROM tmp_etl_job J)\
and custom_step=0\
;\
\
\
--jetzt step-params:\
\
<#foreach etl_step_property in etl_step_properties>\
insert into tmp_etl_step_property(\
etl_step_id,\
prop_name)\
select \
T.tid as etl_step_id,\
'${etl_step_property.prop_name}'\
\
FROM tmp_etl_step T \
where uniquename ='${etl_step_property.etl_step}'\
;\
\
</#foreach>\
\
--einfügen in echte Tabelle:\
insert into etl_step_property(\
etl_step_id,\
prop_name)\
select \
T.etl_step_id,\
T.prop_name\
FROM tmp_etl_step_property T \
;\
\
--jetzt step-relation:\
insert into tmp_etl_step_relation(\
step_id,\
parent_step_id,\
job_id,\
force_continue,\
step_active,\
sortnr,\
custom_step\
)\
select \
tid,\
parent_step_id,\
etl_job_id,\
0 as force_continue,\
1 as step_active,\
sortnr,\
0\
FROM tmp_etl_step \
;\
\
insert into etl_step_relation(\
step_id,\
parent_step_id,\
job_id,\
force_continue,\
step_active,\
sortnr,\
custom_step\
)\
select \
step_id,\
parent_step_id,\
job_id,\
force_continue,\
step_active,\
sortnr,\
custom_step\
FROM tmp_etl_step_relation \
;\
</#foreach> --Ende job\
\
\
drop table tmp_etl_step;\
drop table tmp_etl_job;\
drop table tmp_etl_job_param;\
drop table tmp_etl_step_property;\
drop table tmp_etl_step_relation;\
\
<#if testfaelle?exists>\
\
<#foreach testfall in testfaelle>\
select 'testfall ${testfall.testcase}: ERFOLG'\
from xdummy\
where ${testfall.assertion}=(${testfall.sql})\
;\
select 'testfall ${testfall.testcase}: FEHLER bei ${testfall.testcase}'\
from xdummy\
where ${testfall.assertion}!=(${testfall.sql})\
;\
\
\
</#foreach> --Ende Testfälle\
</#if>\
\
<#if SQLdialect='Informix'> \
--nun xupdates:\
--bei informix kann man TEXT Spalten nicht updaten, daher per jdbc updaten:\
--damit DOSQL nicht den xupdater beim Start dieses Scriptes anwirft,\
--wird das in eine temp. Datei ausgelagert.\
! echo "<xup""date>" > "./tmp"$MANDANTID".sql"\
<#foreach etl_step_property in etl_step_properties>\
\
! echo '<text table="etl_step_property" field="prop_value" where="prop_name='\\''${etl_step_property.prop_name}'\\'' and etl_step_id=(select S.tid from etl_step S where S.uniquename='\\''${etl_step_property.etl_step}'\\'')">${etl_step_property.prop_value}</text>' >>"./tmp"$MANDANTID".sql"\
\
\
</#foreach>\
! echo "</xup""date>" >> "./tmp"$MANDANTID".sql"\
! DOSQL "./tmp"$MANDANTID".sql"\
\
<#else>\
--Postgres:\
<#foreach etl_step_property in etl_step_properties>\
\
update etl_step_property set prop_value='${etl_step_property.prop_value}' where prop_name='${etl_step_property.prop_name}' and etl_step_id=(select S.tid from etl_step S where S.uniquename='${etl_step_property.etl_step}');\
\
</#foreach>\
</#if>\
\
</#macro>^Datenbankunabhängigkeit^^1^

25
src-modules/module/costage/schluesseltabellen/fm_templates_fuellen.sql

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
--freemarker template
--Werden immer ausgetauscht:
delete from fm_templates where id in (select id from tmp_templates);
<#if SQLdialect='Postgres'>
select sp_update_sequence('fm_templates');
</#if>
insert into fm_templates(
id,
content,
description,
comment,
version)
SELECT
id,
content,
description,
comment,
version
FROM tmp_templates;
drop table tmp_templates;

25
src-modules/module/costage/schluesseltabellen/fm_templates_unload.x

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
#!/bin/bash
#löscht alle nicht-ETL-templates und entlädt die Tabelle sortiert ins Rohdaten Verzeichnis (für git-diff).
DOQUERY "create table tmp_templates(tid integer,
id char(200) not null,
content text not null,
description char(200) ,
comment char(200) ,
version integer default 1
)
;"
sx_auto_upload_table.x tmp_templates ./fm_templates.unl
SX_CLIENT=jdbc
export SX_CLIENT
#man_catalogue
DOQUERY "select * from fm_templates where id in (select T.id from tmp_templates T) order by tid" false $DBDELIMITER ./fm_templates.unl txt
SX_CLIENT=psql
export SX_CLIENT
DOQUERY "drop table tmp_templates;"

16
src-modules/module/costage/schluesseltabellen/fm_templates_update.x

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
#!/bin/bash
DOQUERY "create table tmp_templates(tid integer,
id char(200) not null,
content text not null,
description char(200) ,
comment char(200) ,
version integer
)
;"
sx_auto_upload_table.x tmp_templates fm_templates.unl
DOSQL fm_templates_fuellen.sql

14
src-modules/module/costage/schluesseltabellen/sachgebiete_fuellen.sql

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
--Das Sachgebiet 311 wird installiert
delete from sachgebiete where tid in (311);
insert into sachgebiete(tid,name) values (311,'Laderoutinen Administr.');
delete from group_sachgeb_bez where sachgebiete_id in (310,311)
and groupinfo_id in (select G.tid from groupinfo G where G.name='Administratoren' or G.name='superx') ;
insert into group_sachgeb_bez
select G.tid,310 from groupinfo G where G.name='Administratoren' or G.name='superx';
insert into group_sachgeb_bez
select G.tid,311 from groupinfo G where G.name='Administratoren' or G.name='superx';

3
src-modules/module/costage/schluesseltabellen/sachgebiete_loeschen.sql

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
delete from sachgebiete where tid in (310,311);
delete from group_sachgeb_bez where sachgebiete_id in (310,311);
delete from user_sachgeb_bez where sachgebiete_id in (310,311);
Loading…
Cancel
Save