use of org.postgresql.PGConnection in project pentaho-kettle by pentaho.
the class PGBulkLoader method do_copy.
private void do_copy(PGBulkLoaderMeta meta, boolean wait) throws KettleException {
data.db = getDatabase(this, meta);
String copyCmd = getCopyCommand();
try {
connect();
checkClientEncoding();
processTruncate();
logBasic("Launching command: " + copyCmd);
pgCopyOut = new PGCopyOutputStream((PGConnection) data.db.getConnection(), copyCmd);
} catch (Exception ex) {
throw new KettleException("Error while preparing the COPY " + copyCmd, ex);
}
}
Aggregations