Hi i am very new to pentaho kettle-spoon. I want a sample program which takes input from .csv file and push into database and after certain time like 2:30 am a job will run and few records from that database(sql developer) in csv format will emailed to user. I am using Java to call the transformation like:
public static void main(String[] args) {
try {
KettleEnvironment.init();
TransMeta metaData = new TransMeta("hello.ktr");
Trans trans = new Trans( metaData );
trans.execute( null );
trans.waitUntilFinished();
if ( trans.getErrors() > 0 ) {
System.out.print( "Error Executing transformation" );
}
}
catch( KettleException e ) {
e.printStackTrace();
}
}
Here I have created HelloWorld(hello.ktr) program in Spoon and called it in java code. I want to do similar. Making transformation and job in spoon and calling in my java code. kindly help me out with it.