// }
}
@Override
public void read(ILineSender lineSender){
PGCopyInputStream inputStream = null;
if(sql.isEmpty()){
logger.error("Sql for GreenplumReader is empty.");
throw new WormholeException("Sql for GreenplumReader is empty.",JobStatus.READ_FAILED.getStatus()+ERROR_CODE_ADD);
}
logger.info(String.format("GreenplumReader start to query %s .", sql));
for(String sqlItem:sql.split(";")){
sqlItem = sqlItem.trim();
if(sqlItem.isEmpty()) {
continue;
}
try {
inputStream = new PGCopyInputStream((PGConnection) ((DelegatingConnection) conn).getInnermostDelegate(), sqlItem);
fetchData(lineSender,inputStream);
} catch (Exception e) {
logger.error("GreenplumReader error");
WormholeException ex = new WormholeException(e,JobStatus.READ_FAILED.getStatus());
if(e instanceof WormholeException) {