You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.4 KiB
48 lines
1.4 KiB
/* |
|
* de.superx.etl - a package for controlling ETL routines |
|
* Copyright (C) 2021 Daniel Quathamer <danielq@memtext.de> |
|
* |
|
* This package is licensed under the CampusSource License; |
|
* http://www.campussource.de/org/license/ |
|
*/ |
|
package de.superx.elt.ActionHandler; |
|
|
|
import java.io.StringWriter; |
|
import java.sql.Connection; |
|
import java.sql.SQLException; |
|
import java.util.Properties; |
|
import java.util.logging.Logger; |
|
|
|
import de.superx.bin.SxConnection; |
|
import de.superx.elt.QueryResultSerializer; |
|
import de.superx.elt.SqlExecutor; |
|
|
|
public class EtlActionHandlerDoquery extends EtlActionHandler implements EtlActionHandlerI { |
|
|
|
public EtlActionHandlerDoquery() { |
|
|
|
} |
|
@Override |
|
public int execute(StringWriter sw, String mandantid, String stepUniquename,String outFormat) |
|
throws SQLException, Exception |
|
{ |
|
int returnCode=0; |
|
long numberOfRows=0; |
|
this.getConnection(); |
|
String query=handlerSpecificProperties.getProperty("select_stmt"); |
|
this.getConnection(); |
|
SqlExecutor mySqlExecutor=new SqlExecutor("default", stepSxConnection,query,runTimeParams); |
|
returnCode=mySqlExecutor.executeQueries(); |
|
numberOfRows=mySqlExecutor.getNumberOfRows(); |
|
super.setNumberOfRows(numberOfRows); |
|
stepSxConnection.close(); |
|
super.setReturnCode(returnCode); |
|
|
|
|
|
//System.out.println(sw.toString()); |
|
stepSxConnection.close(); |
|
//super.setLogOutput(msg); |
|
return returnCode; |
|
} |
|
|
|
}
|
|
|