JDBC
Pinot offers standard JDBC interface to query the database. This makes it easier to integrate Pinot with other applications such as Tableau.
Installation
You can include the JDBC dependency in your code as follows -
You can also compile the JDBC code into a JAR and place the JAR in the Drivers directory of your application.
There is no need to register the driver manually as it will automatically register itself at the startup of the application.
Usage
Here's an example of how to use the pinot-jdbc-client
for querying. The client only requires the controller URL.
You can also use PreparedStatements. The placeholder parameters are represented using ?
** (question mark) symbol.
Limitation
The JDBC client doesn't support INSERT
, DELETE
or UPDATE
statements due to the database limitations. You can only use the client to query the database.
The driver is also not completely ANSI SQL 92 compliant.
If you want to use JDBC driver to integrate Pinot with other applications, do make sure to check JDBC ConnectionMetadata in your code. This will help in determining which features cannot be supported by Pinot since it is an OLAP database.
Last updated