Java and Clover ETL integration

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!

Hello,
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.

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

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

or

graph.getGraphProperties().setProperty("FILENAME", newFilename);