# # ITSV GmbH # CCDB - Command and Control Database # # FILE: dquerymfile_LOADMVBRFAUSWMULTI.txt # DESCRIPTION: dquery definition for LOADMVBRFAUSWMULTI # # @group SVCLMVBRFAUSWDATALOAD @querytitle Alle noch nicht geladenen Träger-MVB-Auswertung_MeldungenClearingfaelle-Dateien laden @description lädt alle managed files mit Auswertung_MeldungenClearingfaelle mit Hilfe des Query LOADMVBRFAUSW, die noch nicht status="loaded" haben @attributenames sql_select:string:{{sql_selectoptions}} @sql_select SELECT MFILEID,MFILENAME,MFILEPATH,MFILELPATH,MFILEATTRIBS FROM CCMFILES WHERE MFILETYPE='dmvbrfausw' AND MFILEATTRIBS not like '%"loadstate":"loaded"%' AND MFILEATTRIBS not like '%"loadstate":"inhibited"%' @sql_selectoptions {"labeltext":"Auswahl-SQL-Statement","typedesc":"SQL-Statement für Abfrage in CCMFILES um die zu ladenden Dateien auszuwählen"} @querytype function @function seqtrans.seqtrans @display_options { fullname_filter_regex: "dquery_progress\..*?\.(?:records_to_process|current_record|TRAEGER|FTIMESTAMP)" } ~query.tsteps # # <>: # if (this.init_done) goto record_proper # # <>: initialize iterators # qexpression proc: { if (!this.init_done) { this.startstime = aux.nowstring(); this.startmillis = Date.now(); this.filesprocessed = 0; this.filestoprocess = this.inputresult.getRowCount(); this.protocol = new Array(); this.fresults = new Array(); this.ppush([this.phead("started"),"TIME="+aux.nowsvtime(),"FILES_TO_LOAD="+this.filestoprocess,""]); } } # # <>: init done # qexpression this.init_done = true; # # <>: load one file # record_proper: query.dataname LOADMVBRFAUSW query.mfileid @@MFILEID@@ post_qexpression this.filesprocessed++; this.fresults.push(this.stepresult); this.ppush([this.phead("file_processed"),"MFILEID="+this.cdata.MFILEID,"MFILENAME="+this.cdata.MFILENAME,this.stepresult]); # # <>: check if this was the last record and skip final actions if not # if (!this.is_last_record) goto record_done # # <>: finalize protocol, seqtrans will create a visible result from the protocol # qexpression this.finishstime = aux.nowstring().substring(0,14); this.endmillis = Date.now(); this.elapsedmillis = this.endmillis - this.startmillis; this.elapsedseconds = this.elapsedmillis/1000; let totalrecs = 0; let totalmillis = 0; let cfr; if (this.fresults.length>0) { this.ppush(["Verarbeitungs-Statistik:","","",""]); this.ppush(["Träger/Zeitstempel","Anzahl verarbeiteter Datensätze","Durchlaufzeit","Datensätze/Sekunde"]); } for (let fi=0; fi"+ " Vorgang beendet: "+this.finishstime+""+ " Durchlaufzeit(Sekunden):"+this.elapsedseconds+""+ " Datensätze/Sekunde: "+this.overallrecspersecond+""+ ""; this.query.result_filename = "LOADRESULT_"+this.finishstime; this.ppush([this.phead("finished"), { rawhtml: "

TIME=" + aux.nowsvtime() + "
ELAPSED_SECONDS="+(this.elapsedmillis/1000)+"
" }, "FILES_PROCESSED="+this.filesprocessed, ""]); this.query.title = " "+this.filesprocessed+" Dateien mit Auswertung_MeldungenClearingfaelle geladen"; # # <>: end of record processing # record_done: end