Sha256: 9f9d1d11af30c7c908bacad547614797aa4cf1d6883bb0ba71b40cd6fd4c6a0c
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
package org.embulk.output.redshift; import java.util.Properties; import java.sql.Driver; import java.sql.Connection; import java.sql.SQLException; import org.embulk.output.jdbc.JdbcOutputConnector; import org.embulk.output.jdbc.JdbcOutputConnection; public class RedshiftOutputConnector implements JdbcOutputConnector { private static final Driver driver = new org.postgresql.Driver(); private final String url; private final Properties properties; private final String schemaName; public RedshiftOutputConnector(String url, Properties properties, String schemaName) { this.url = url; this.properties = properties; this.schemaName = schemaName; } @Override public RedshiftOutputConnection connect(boolean autoCommit) throws SQLException { Connection c = driver.connect(url, properties); try { RedshiftOutputConnection con = new RedshiftOutputConnection(c, schemaName, autoCommit); c = null; return con; } finally { if (c != null) { c.close(); } } } }
Version data entries
2 entries across 2 versions & 1 rubygems