git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/DataMiner@144400 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fbf3eb8081
commit
e65b50b735
|
@ -0,0 +1,36 @@
|
|||
package org.gcube.dataanalysis.wps.statisticalmanager.synchserver.test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||
import org.gcube.dataanalysis.ecoengine.datatypes.enumtypes.TableTemplates;
|
||||
import org.gcube.dataanalysis.ecoengine.test.regression.Regressor;
|
||||
import org.gcube.dataanalysis.wps.statisticalmanager.synchserver.infrastructure.DatabaseInfo;
|
||||
import org.gcube.dataanalysis.wps.statisticalmanager.synchserver.infrastructure.InfrastructureDialoguer;
|
||||
import org.gcube.dataanalysis.wps.statisticalmanager.synchserver.mapping.InputsManager;
|
||||
|
||||
public class DumpTestTables {
|
||||
|
||||
public static void main(String[] args) throws Exception{
|
||||
Regressor regressor = new Regressor();
|
||||
AlgorithmConfiguration config = regressor.getConfig();
|
||||
|
||||
String tableName = "spread_test";
|
||||
File tableFile = new File("C:\\Users\\coro\\Desktop\\DATABASE e NOTE\\spread_input_dataset .csv");
|
||||
String inputTableTemplate = TableTemplates.GENERIC.name();
|
||||
String scope = "/gcube/devsec/devVRE";
|
||||
System.out.println("Asking the infra for database in scope: "+scope);
|
||||
InfrastructureDialoguer dialoguer = new InfrastructureDialoguer(scope);
|
||||
DatabaseInfo supportDatabaseInfo = dialoguer.getDatabaseInfo("StatisticalManagerDataBase");
|
||||
InputsManager manager = new InputsManager(null, config, "test");
|
||||
manager.configSupportDatabaseParameters(supportDatabaseInfo);
|
||||
System.out.println("Database retrieved: "+supportDatabaseInfo.url);
|
||||
|
||||
System.out.println("Creating: "+tableName);
|
||||
|
||||
manager.createTable(tableName, tableFile,manager.getConfig(), supportDatabaseInfo, inputTableTemplate);
|
||||
|
||||
System.out.println("DB coordinates: \nURL "+supportDatabaseInfo.url+"\n user "+supportDatabaseInfo.username+"\n password "+supportDatabaseInfo.password+"\n driver "+supportDatabaseInfo.driver+"\n dialect "+supportDatabaseInfo.dialect);
|
||||
System.out.println("All done");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue