I need to read set of columns from a mysql table and pass their values to a function in java written inside tjava.
Use a tMySQLInput to retrieve your data. Connect this to a tFlowToIterate component. If you have 3 columns in your select called "name", "age", and "date_of_birth", and your row coming from your DB component is called "row1", you will get the following globalMap variables created (these are the keys)....
Connect your tJava to the tFlowToIterate using an iterate link. Then you can access the values from the keys shown above like below (assuming that "name" is a String, "age" is an Integer and "date_of_birth" is a Date)....
String nameVal = ((String)globalMap.get("row1.name")); Integer ageVal = ((Integer)globalMap.get("row1.age")); Date dobVal = ((Date)globalMap.get("row1.date_of_birth"));