JPA code :
List<Object[]> result=null;
try {
em = getEntityManager();
if(em != null){
Query query = em.createNativeQuery("{call procedure Name('"+geoLocationName+"')}");
result = query.getResultList();
} else {
logger.info("Connection is not successful");
}
} catch (Exception ex) {
logger.error("Error while fetching data from ::"+ex.getMessage());
} finally {
if(em != null) {
em.close();
}
}
I am reading a procedure by using the above code.
How can I write this result into a CSV file, which has to store into a FTP path without storing it locally ?