
oenix.phoenix-server-hbase-2.6.5.2.1.source-code.overview.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phoenix-server-hbase-2.6
Show all versions of phoenix-server-hbase-2.6
Phoenix HBase Server Side JAR
The newest version!
This document is for the JDBC implementation of Phoenix, targeting those who are interested in extending the level of SQL support.
For users of Phoenix, the programmatic API is JDBC.
For example, the following snippet demonstrates how to query a table:
Properties props = new Properties();
// Ensure the driver is on classpath
// Connect through Phoenix to the zookeeper quorum with a host name of myServer
Connection conn = DriverManager.getConnection("jdbc:phoenix:myServer", props);
try {
PreparedStatement statement = conn.prepareStatement("SELECT count(1) FROM product_metrics WHERE organization_id=?");
statement.setString(1, orgId);
ResultSet rs = statement.executeQuery();
if (rs.next()) {
System.out.println("Row count of orgId='" + orgId + "' is " + rs.getLong(1));
}
} finally {
conn.close();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy