-
greenplum.jar 官方JDBC驱动下载
资源介绍
public static void testGreenplum() {
try {
Class.forName("com.pivotal.jdbc.GreenplumDriver");
Connection db = DriverManager
.getConnection(
"jdbc:pivotal:greenplum://xxx:5432;DatabaseName=core_db",
"gpadmin", "gpadmin");
Statement st = db.createStatement();
ResultSet rs = st
.executeQuery("SELECT * FROM core_db.analysis_user limit 100");
while (rs.next()) {
System.out.println(rs.getString(1));
}
rs.close();
st.close();
} catch (Exception e) {
e.printStackTrace();
}
}