Daniel Quathamer
2 years ago
9 changed files with 3616 additions and 326 deletions
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash |
||||
#bitte im Verzeichnis des Scripts ausführen |
||||
mkdir -p tmp_testfall_import |
||||
groovy ~/git/superx/scripts/groovy/copy_kettlejob.groovy --strip-connections ../../src-modules/module/qa/etl/testfall_import/testfall_import.kjb tmp_testfall_import |
||||
groovy ~/git/superx/scripts/groovy/copy_kettlejob.groovy --strip-connections ../../src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.kjb tmp_testfall_import |
||||
groovy ~/git/superx/scripts/groovy/copy_kettlejob.groovy --strip-connections ../../src-modules/module/qa/etl/testfall_import/testfall_import_xml.kjb tmp_testfall_import |
||||
|
||||
#Wenn man die Entwicklung beendet hat, kann man diese Dateien ins richtige git Verzeichnis kopieren und committen: |
||||
#cp -a tmp_testfall_import/* ../../src-modules/module/qa/etl/testfall_import |
||||
|
Binary file not shown.
@ -0,0 +1,508 @@
@@ -0,0 +1,508 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<job> |
||||
<name>testfall_import</name> |
||||
<description/> |
||||
<extended_description/> |
||||
<job_version/> |
||||
<job_status>0</job_status> |
||||
<directory>/</directory> |
||||
<created_user>-</created_user> |
||||
<created_date>2020/02/23 21:14:53.737</created_date> |
||||
<modified_user>-</modified_user> |
||||
<modified_date>2020/02/23 21:14:53.737</modified_date> |
||||
<parameters> |
||||
<parameter> |
||||
<name>PATH_TO_UPLOADFILE</name> |
||||
<default_value>file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei_dbtest.xlsx</default_value> |
||||
<description/> |
||||
</parameter> |
||||
<parameter> |
||||
<name>userid</name> |
||||
<default_value>803</default_value> |
||||
<description/> |
||||
</parameter> |
||||
</parameters> |
||||
<connection> |
||||
<name>eduetl</name> |
||||
<server>localhost</server> |
||||
<type>POSTGRESQL</type> |
||||
<access>Native</access> |
||||
<database>eduetl_ude</database> |
||||
<port>9998</port> |
||||
<username>superx</username> |
||||
<password>Encrypted 2be98afc86aa7f292a20aa77fd0c3fa9e</password> |
||||
<servername>superx_host_iso</servername> |
||||
<data_tablespace/> |
||||
<index_tablespace/> |
||||
<attributes> |
||||
<attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> |
||||
<attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> |
||||
<attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> |
||||
<attribute><code>PORT_NUMBER</code><attribute>9998</attribute></attribute> |
||||
<attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>Y</attribute></attribute> |
||||
<attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> |
||||
<attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> |
||||
<attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> |
||||
<attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> |
||||
</attributes> |
||||
</connection> |
||||
<slaveservers> |
||||
</slaveservers> |
||||
<job-log-table> |
||||
<connection/> |
||||
<schema/> |
||||
<table/> |
||||
<size_limit_lines/> |
||||
<interval/> |
||||
<timeout_days/> |
||||
<field> |
||||
<id>ID_JOB</id> |
||||
<enabled>Y</enabled> |
||||
<name>ID_JOB</name> |
||||
</field> |
||||
<field> |
||||
<id>CHANNEL_ID</id> |
||||
<enabled>Y</enabled> |
||||
<name>CHANNEL_ID</name> |
||||
</field> |
||||
<field> |
||||
<id>JOBNAME</id> |
||||
<enabled>Y</enabled> |
||||
<name>JOBNAME</name> |
||||
</field> |
||||
<field> |
||||
<id>STATUS</id> |
||||
<enabled>Y</enabled> |
||||
<name>STATUS</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_READ</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_READ</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_WRITTEN</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_WRITTEN</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_UPDATED</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_UPDATED</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_INPUT</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_INPUT</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_OUTPUT</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_OUTPUT</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_REJECTED</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_REJECTED</name> |
||||
</field> |
||||
<field> |
||||
<id>ERRORS</id> |
||||
<enabled>Y</enabled> |
||||
<name>ERRORS</name> |
||||
</field> |
||||
<field> |
||||
<id>STARTDATE</id> |
||||
<enabled>Y</enabled> |
||||
<name>STARTDATE</name> |
||||
</field> |
||||
<field> |
||||
<id>ENDDATE</id> |
||||
<enabled>Y</enabled> |
||||
<name>ENDDATE</name> |
||||
</field> |
||||
<field> |
||||
<id>LOGDATE</id> |
||||
<enabled>Y</enabled> |
||||
<name>LOGDATE</name> |
||||
</field> |
||||
<field> |
||||
<id>DEPDATE</id> |
||||
<enabled>Y</enabled> |
||||
<name>DEPDATE</name> |
||||
</field> |
||||
<field> |
||||
<id>REPLAYDATE</id> |
||||
<enabled>Y</enabled> |
||||
<name>REPLAYDATE</name> |
||||
</field> |
||||
<field> |
||||
<id>LOG_FIELD</id> |
||||
<enabled>Y</enabled> |
||||
<name>LOG_FIELD</name> |
||||
</field> |
||||
<field> |
||||
<id>EXECUTING_SERVER</id> |
||||
<enabled>N</enabled> |
||||
<name>EXECUTING_SERVER</name> |
||||
</field> |
||||
<field> |
||||
<id>EXECUTING_USER</id> |
||||
<enabled>N</enabled> |
||||
<name>EXECUTING_USER</name> |
||||
</field> |
||||
<field> |
||||
<id>START_JOB_ENTRY</id> |
||||
<enabled>N</enabled> |
||||
<name>START_JOB_ENTRY</name> |
||||
</field> |
||||
<field> |
||||
<id>CLIENT</id> |
||||
<enabled>N</enabled> |
||||
<name>CLIENT</name> |
||||
</field> |
||||
</job-log-table> |
||||
<jobentry-log-table> |
||||
<connection/> |
||||
<schema/> |
||||
<table/> |
||||
<timeout_days/> |
||||
<field> |
||||
<id>ID_BATCH</id> |
||||
<enabled>Y</enabled> |
||||
<name>ID_BATCH</name> |
||||
</field> |
||||
<field> |
||||
<id>CHANNEL_ID</id> |
||||
<enabled>Y</enabled> |
||||
<name>CHANNEL_ID</name> |
||||
</field> |
||||
<field> |
||||
<id>LOG_DATE</id> |
||||
<enabled>Y</enabled> |
||||
<name>LOG_DATE</name> |
||||
</field> |
||||
<field> |
||||
<id>JOBNAME</id> |
||||
<enabled>Y</enabled> |
||||
<name>TRANSNAME</name> |
||||
</field> |
||||
<field> |
||||
<id>JOBENTRYNAME</id> |
||||
<enabled>Y</enabled> |
||||
<name>STEPNAME</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_READ</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_READ</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_WRITTEN</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_WRITTEN</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_UPDATED</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_UPDATED</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_INPUT</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_INPUT</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_OUTPUT</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_OUTPUT</name> |
||||
</field> |
||||
<field> |
||||
<id>LINES_REJECTED</id> |
||||
<enabled>Y</enabled> |
||||
<name>LINES_REJECTED</name> |
||||
</field> |
||||
<field> |
||||
<id>ERRORS</id> |
||||
<enabled>Y</enabled> |
||||
<name>ERRORS</name> |
||||
</field> |
||||
<field> |
||||
<id>RESULT</id> |
||||
<enabled>Y</enabled> |
||||
<name>RESULT</name> |
||||
</field> |
||||
<field> |
||||
<id>NR_RESULT_ROWS</id> |
||||
<enabled>Y</enabled> |
||||
<name>NR_RESULT_ROWS</name> |
||||
</field> |
||||
<field> |
||||
<id>NR_RESULT_FILES</id> |
||||
<enabled>Y</enabled> |
||||
<name>NR_RESULT_FILES</name> |
||||
</field> |
||||
<field> |
||||
<id>LOG_FIELD</id> |
||||
<enabled>N</enabled> |
||||
<name>LOG_FIELD</name> |
||||
</field> |
||||
<field> |
||||
<id>COPY_NR</id> |
||||
<enabled>N</enabled> |
||||
<name>COPY_NR</name> |
||||
</field> |
||||
</jobentry-log-table> |
||||
<channel-log-table> |
||||
<connection/> |
||||
<schema/> |
||||
<table/> |
||||
<timeout_days/> |
||||
<field> |
||||
<id>ID_BATCH</id> |
||||
<enabled>Y</enabled> |
||||
<name>ID_BATCH</name> |
||||
</field> |
||||
<field> |
||||
<id>CHANNEL_ID</id> |
||||
<enabled>Y</enabled> |
||||
<name>CHANNEL_ID</name> |
||||
</field> |
||||
<field> |
||||
<id>LOG_DATE</id> |
||||
<enabled>Y</enabled> |
||||
<name>LOG_DATE</name> |
||||
</field> |
||||
<field> |
||||
<id>LOGGING_OBJECT_TYPE</id> |
||||
<enabled>Y</enabled> |
||||
<name>LOGGING_OBJECT_TYPE</name> |
||||
</field> |
||||
<field> |
||||
<id>OBJECT_NAME</id> |
||||
<enabled>Y</enabled> |
||||
<name>OBJECT_NAME</name> |
||||
</field> |
||||
<field> |
||||
<id>OBJECT_COPY</id> |
||||
<enabled>Y</enabled> |
||||
<name>OBJECT_COPY</name> |
||||
</field> |
||||
<field> |
||||
<id>REPOSITORY_DIRECTORY</id> |
||||
<enabled>Y</enabled> |
||||
<name>REPOSITORY_DIRECTORY</name> |
||||
</field> |
||||
<field> |
||||
<id>FILENAME</id> |
||||
<enabled>Y</enabled> |
||||
<name>FILENAME</name> |
||||
</field> |
||||
<field> |
||||
<id>OBJECT_ID</id> |
||||
<enabled>Y</enabled> |
||||
<name>OBJECT_ID</name> |
||||
</field> |
||||
<field> |
||||
<id>OBJECT_REVISION</id> |
||||
<enabled>Y</enabled> |
||||
<name>OBJECT_REVISION</name> |
||||
</field> |
||||
<field> |
||||
<id>PARENT_CHANNEL_ID</id> |
||||
<enabled>Y</enabled> |
||||
<name>PARENT_CHANNEL_ID</name> |
||||
</field> |
||||
<field> |
||||
<id>ROOT_CHANNEL_ID</id> |
||||
<enabled>Y</enabled> |
||||
<name>ROOT_CHANNEL_ID</name> |
||||
</field> |
||||
</channel-log-table> |
||||
<pass_batchid>N</pass_batchid> |
||||
<shared_objects_file/> |
||||
<entries> |
||||
<entry> |
||||
<name>START</name> |
||||
<description/> |
||||
<type>SPECIAL</type> |
||||
<start>Y</start> |
||||
<dummy>N</dummy> |
||||
<repeat>N</repeat> |
||||
<schedulerType>0</schedulerType> |
||||
<intervalSeconds>0</intervalSeconds> |
||||
<intervalMinutes>60</intervalMinutes> |
||||
<hour>12</hour> |
||||
<minutes>0</minutes> |
||||
<weekDay>1</weekDay> |
||||
<DayOfMonth>1</DayOfMonth> |
||||
<parallel>N</parallel> |
||||
<draw>Y</draw> |
||||
<nr>0</nr> |
||||
<xloc>112</xloc> |
||||
<yloc>80</yloc> |
||||
</entry> |
||||
<entry> |
||||
<name>testfall_import_def</name> |
||||
<description/> |
||||
<type>TRANS</type> |
||||
<specification_method>filename</specification_method> |
||||
<trans_object_id/> |
||||
<filename>${Internal.Job.Filename.Directory}/testfall_import_dbtest_def.ktr</filename> |
||||
<transname/> |
||||
<arg_from_previous>N</arg_from_previous> |
||||
<params_from_previous>N</params_from_previous> |
||||
<exec_per_row>N</exec_per_row> |
||||
<clear_rows>N</clear_rows> |
||||
<clear_files>N</clear_files> |
||||
<set_logfile>N</set_logfile> |
||||
<logfile/> |
||||
<logext/> |
||||
<add_date>N</add_date> |
||||
<add_time>N</add_time> |
||||
<loglevel>Basic</loglevel> |
||||
<cluster>N</cluster> |
||||
<slave_server_name/> |
||||
<set_append_logfile>N</set_append_logfile> |
||||
<wait_until_finished>Y</wait_until_finished> |
||||
<follow_abort_remote>N</follow_abort_remote> |
||||
<create_parent_folder>N</create_parent_folder> |
||||
<logging_remote_work>N</logging_remote_work> |
||||
<parameters> |
||||
<pass_all_parameters>Y</pass_all_parameters> |
||||
</parameters> |
||||
<parallel>N</parallel> |
||||
<draw>Y</draw> |
||||
<nr>0</nr> |
||||
<xloc>448</xloc> |
||||
<yloc>80</yloc> |
||||
</entry> |
||||
<entry> |
||||
<name>create table tmp_testfall_import</name> |
||||
<description/> |
||||
<type>SQL</type> |
||||
<sql>
drop table if exists tmp_qa_dbtest;
drop table if exists tmp_qa_dbtest_assertion;
drop TABLE if exists tmp_qa_resultset;
drop table if exists tmp_testfall_import_felder;
drop table if exists tmp_testfall_import_feldwerte;

CREATE TABLE tmp_qa_dbtest
(
 tid serial NOT NULL,
 uniquename varchar(255) NOT NULL,
 name varchar(255),
 systeminfo_id integer,
 resultset_id integer ,
resultset_uniquename varchar(255),
 whereclause text,
 description text,
 active smallint DEFAULT 1
);
CREATE TABLE tmp_qa_dbtest_assertion
(
 tid serial NOT NULL,
 dbtest_id integer,
dbtest_uniquename varchar(255),
systeminfo_id integer,
 rownr integer,
 def_col_caption varchar(255),
 def_col_name varchar(255),
 def_col_value varchar(255)
);
CREATE TABLE tmp_qa_resultset
(
 tid serial NOT NULL,
 uniquename varchar(255) NOT NULL,
 name varchar(255),
 systeminfo_id integer NOT NULL,
 fromclause text,
 fieldclause text,
 groupbyclause varchar(255),
 orderbyclause varchar(255)
);
create table tmp_testfall_import_felder(
feldnr integer,
feldname varchar(255)
);
create table tmp_testfall_import_erg(
feldnr integer,
feldname varchar(255)
);

create table tmp_testfall_import_feldwerte(
systeminfo_id integer,
testfall_schluessel varchar(255),
resultset_uniquename varchar(255),
feldnr integer,
feldwert varchar(255)
);
</sql> |
||||
<useVariableSubstitution>F</useVariableSubstitution> |
||||
<sqlfromfile>F</sqlfromfile> |
||||
<sqlfilename/> |
||||
<sendOneStatement>F</sendOneStatement> |
||||
<connection>eduetl</connection> |
||||
<parallel>N</parallel> |
||||
<draw>Y</draw> |
||||
<nr>0</nr> |
||||
<xloc>256</xloc> |
||||
<yloc>80</yloc> |
||||
</entry> |
||||
<entry> |
||||
<name>finalize</name> |
||||
<description/> |
||||
<type>SQL</type> |
||||
<sql/> |
||||
<useVariableSubstitution>T</useVariableSubstitution> |
||||
<sqlfromfile>T</sqlfromfile> |
||||
<sqlfilename>${Internal.Job.Filename.Directory}/testfall_import_dbtest.sql</sqlfilename> |
||||
<sendOneStatement>F</sendOneStatement> |
||||
<connection>eduetl</connection> |
||||
<parallel>N</parallel> |
||||
<draw>Y</draw> |
||||
<nr>0</nr> |
||||
<xloc>816</xloc> |
||||
<yloc>80</yloc> |
||||
</entry> |
||||
<entry> |
||||
<name>testfall_import 2</name> |
||||
<description/> |
||||
<type>TRANS</type> |
||||
<specification_method>filename</specification_method> |
||||
<trans_object_id/> |
||||
<filename>${Internal.Job.Filename.Directory}/testfall_import_dbtest.ktr</filename> |
||||
<transname/> |
||||
<arg_from_previous>N</arg_from_previous> |
||||
<params_from_previous>N</params_from_previous> |
||||
<exec_per_row>N</exec_per_row> |
||||
<clear_rows>N</clear_rows> |
||||
<clear_files>N</clear_files> |
||||
<set_logfile>N</set_logfile> |
||||
<logfile/> |
||||
<logext/> |
||||
<add_date>N</add_date> |
||||
<add_time>N</add_time> |
||||
<loglevel>Basic</loglevel> |
||||
<cluster>N</cluster> |
||||
<slave_server_name/> |
||||
<set_append_logfile>N</set_append_logfile> |
||||
<wait_until_finished>Y</wait_until_finished> |
||||
<follow_abort_remote>N</follow_abort_remote> |
||||
<create_parent_folder>N</create_parent_folder> |
||||
<logging_remote_work>N</logging_remote_work> |
||||
<parameters> |
||||
<pass_all_parameters>Y</pass_all_parameters> |
||||
</parameters> |
||||
<parallel>N</parallel> |
||||
<draw>Y</draw> |
||||
<nr>0</nr> |
||||
<xloc>608</xloc> |
||||
<yloc>80</yloc> |
||||
</entry> |
||||
</entries> |
||||
<hops> |
||||
<hop> |
||||
<from>START</from> |
||||
<to>create table tmp_testfall_import</to> |
||||
<from_nr>0</from_nr> |
||||
<to_nr>0</to_nr> |
||||
<enabled>Y</enabled> |
||||
<evaluation>Y</evaluation> |
||||
<unconditional>Y</unconditional> |
||||
</hop> |
||||
<hop> |
||||
<from>create table tmp_testfall_import</from> |
||||
<to>testfall_import_def</to> |
||||
<from_nr>0</from_nr> |
||||
<to_nr>0</to_nr> |
||||
<enabled>Y</enabled> |
||||
<evaluation>Y</evaluation> |
||||
<unconditional>N</unconditional> |
||||
</hop> |
||||
<hop> |
||||
<from>testfall_import_def</from> |
||||
<to>testfall_import 2</to> |
||||
<from_nr>0</from_nr> |
||||
<to_nr>0</to_nr> |
||||
<enabled>Y</enabled> |
||||
<evaluation>Y</evaluation> |
||||
<unconditional>N</unconditional> |
||||
</hop> |
||||
<hop> |
||||
<from>testfall_import 2</from> |
||||
<to>finalize</to> |
||||
<from_nr>0</from_nr> |
||||
<to_nr>0</to_nr> |
||||
<enabled>Y</enabled> |
||||
<evaluation>Y</evaluation> |
||||
<unconditional>N</unconditional> |
||||
</hop> |
||||
</hops> |
||||
<notepads> |
||||
<notepad> |
||||
<note>TODO: Parameter userid aus Maskenfeld</note> |
||||
<xloc>472</xloc> |
||||
<yloc>234</yloc> |
||||
<width>273</width> |
||||
<heigth>27</heigth> |
||||
<fontname/> |
||||
<fontsize>-1</fontsize> |
||||
<fontbold>N</fontbold> |
||||
<fontitalic>N</fontitalic> |
||||
<fontcolorred>0</fontcolorred> |
||||
<fontcolorgreen>0</fontcolorgreen> |
||||
<fontcolorblue>0</fontcolorblue> |
||||
<backgroundcolorred>255</backgroundcolorred> |
||||
<backgroundcolorgreen>205</backgroundcolorgreen> |
||||
<backgroundcolorblue>112</backgroundcolorblue> |
||||
<bordercolorred>100</bordercolorred> |
||||
<bordercolorgreen>100</bordercolorgreen> |
||||
<bordercolorblue>100</bordercolorblue> |
||||
<drawshadow>Y</drawshadow> |
||||
</notepad> |
||||
</notepads> |
||||
</job> |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,126 @@
@@ -0,0 +1,126 @@
|
||||
|
||||
delete from qa_resultset |
||||
where (systeminfo_id,uniquename) |
||||
in (select systeminfo_id,uniquename |
||||
from tmp_qa_resultset ); |
||||
|
||||
insert into qa_resultset |
||||
( |
||||
uniquename, |
||||
name, |
||||
systeminfo_id, |
||||
fromclause, |
||||
fieldclause, |
||||
groupbyclause, |
||||
orderbyclause |
||||
) |
||||
SELECT |
||||
uniquename, |
||||
name, |
||||
systeminfo_id, |
||||
fromclause, |
||||
fieldclause, |
||||
groupbyclause, |
||||
orderbyclause |
||||
FROM tmp_qa_resultset |
||||
; |
||||
|
||||
update tmp_qa_dbtest |
||||
set whereclause=''; |
||||
|
||||
update tmp_qa_dbtest |
||||
set whereclause=whereclause || F.feldname || '::varchar(255)='''|| W.feldwert || '''' |
||||
from tmp_testfall_import_felder F, tmp_testfall_import_feldwerte W |
||||
where F.feldnr=W.feldnr |
||||
and W.testfall_schluessel=tmp_qa_dbtest.uniquename |
||||
and W.feldnr=1; |
||||
|
||||
update tmp_qa_dbtest |
||||
set whereclause=whereclause || ' and ' || F.feldname || '::varchar(255)='''|| W.feldwert || '''' |
||||
from tmp_testfall_import_felder F, tmp_testfall_import_feldwerte W |
||||
where F.feldnr=W.feldnr |
||||
and W.testfall_schluessel=tmp_qa_dbtest.uniquename |
||||
and W.feldnr=2; |
||||
|
||||
|
||||
update tmp_qa_dbtest |
||||
set whereclause=whereclause || ' and ' || F.feldname || '::varchar(255)='''|| W.feldwert || '''' |
||||
from tmp_testfall_import_felder F, tmp_testfall_import_feldwerte W |
||||
where F.feldnr=W.feldnr |
||||
and W.testfall_schluessel=tmp_qa_dbtest.uniquename |
||||
and W.feldnr=3; |
||||
|
||||
|
||||
update tmp_qa_dbtest |
||||
set whereclause=whereclause || ' and ' || F.feldname || '::varchar(255)='''|| W.feldwert || '''' |
||||
from tmp_testfall_import_felder F, tmp_testfall_import_feldwerte W |
||||
where F.feldnr=W.feldnr |
||||
and W.testfall_schluessel=tmp_qa_dbtest.uniquename |
||||
and W.feldnr=4; |
||||
|
||||
|
||||
delete from qa_dbtest_assertion |
||||
where dbtest_id in (select D.tid |
||||
from qa_dbtest D, tmp_qa_dbtest T |
||||
where D.systeminfo_id=T.systeminfo_id |
||||
and D.uniquename=T.uniquename |
||||
); |
||||
|
||||
|
||||
delete from qa_dbtest |
||||
where (systeminfo_id,uniquename) in |
||||
(select systeminfo_id,uniquename |
||||
from tmp_qa_dbtest T |
||||
); |
||||
|
||||
insert into qa_dbtest( uniquename, |
||||
name, |
||||
systeminfo_id, |
||||
resultset_id, |
||||
whereclause, |
||||
description, |
||||
active |
||||
) |
||||
select distinct |
||||
T.uniquename, |
||||
T.name, |
||||
T.systeminfo_id, |
||||
R.tid, |
||||
T.whereclause, |
||||
T.description, |
||||
T.active |
||||
FROM tmp_qa_dbtest T, qa_resultset R |
||||
where R.uniquename=T.resultset_uniquename |
||||
; |
||||
|
||||
insert into qa_dbtest_assertion |
||||
( dbtest_id, |
||||
rownr, |
||||
def_col_caption, |
||||
def_col_name, |
||||
def_col_value, |
||||
def_col_function) |
||||
select |
||||
D.tid, |
||||
1, |
||||
E.feldname, |
||||
E.feldname, |
||||
A.def_col_value, |
||||
'decval' |
||||
|
||||
from qa_dbtest D ,tmp_qa_dbtest_assertion A, tmp_testfall_import_erg E |
||||
where E.feldnr::varchar(255)=A.def_col_name |
||||
and D.uniquename=A.dbtest_uniquename |
||||
and D.systeminfo_id=A.systeminfo_id |
||||
; |
||||
|
||||
|
||||
drop table tmp_qa_dbtest_assertion; |
||||
drop table tmp_testfall_import_erg; |
||||
|
||||
drop table tmp_qa_dbtest; |
||||
drop table tmp_testfall_import_felder ; |
||||
drop table tmp_testfall_import_feldwerte; |
||||
|
||||
|
||||
|
Loading…
Reference in new issue