Java and Clover ETL integration

Discussion on developing CloverDX engine, transformation components etc.

Posts: 1
Joined: Mon Oct 17, 2011 3:44 am

Java and Clover ETL integration

Postby ps.jecaspe » Mon Oct 17, 2011 8:09 am

How can I integrate my CloverETL project with my Java Project?

For example, I have Java GUI application that will get the name of the file that the user wants to download and transform from an FTP Server. How can I past the filename (i.e. "MyFilename.csv") to the UniversalDataReader so that my UniversalDataReader could read different files from the FTP server.

Thanks a lot!

Posts: 841
Joined: Fri Jul 20, 2007 9:28 am

Re: Java and Clover ETL integration

Postby avackova » Mon Oct 17, 2011 9:08 am

unfortunately you can't change the fileURL attribute in DataReader object; you need to create a new one, when you build a graph in java. When reading a graph from xml definition (ransformationGraphXMLReaderWriter.loadGraph(in, runtimeContext.getAdditionalProperties())), you need to change the fileURL attribute and read the graph again.
Agata Vackova
Javlin a.s.
[email protected]

Posts: 36
Joined: Mon Dec 13, 2010 6:52 pm

Re: Java and Clover ETL integration

Postby julrych » Wed Oct 19, 2011 12:00 am

You can also use parameters - in the reader, specify value of fileURL as a parameter ${FILENAME}. Then change the FILENAME property using

Code: Select all

graph.getRuntimeContext().addAdditionalProperty("FILENAME", newFilename);


Code: Select all

graph.getGraphProperties().setProperty("FILENAME", newFilename);
Jan Ulrych
Javlin Inc.
[email protected]