Created on 01-18-202109:29 PM - edited on 01-20-202106:49 PM by subratadas
For a recent project I was tasked with configuring DBeaver to connect to Phoenix running in an instance of the CDP Datahub. CDP provides a means of creating a Datahub for running an Operational Database (HBase) and using JDBC via Phoenix to query it.
Let's start a Datahub from an Operational Database template.
Provision an Operational Database
Log into a CDP Instance
Select Data Hub Clusters
Select Create Data Hub
Choose the Cloud environment
Choose the template 7.2.2 - Operational Database with SQL
Provide a unique name for the cluster
Click Provision Cluster
This will start a Datahub cluster running HBase and Phoenix as well as all of the security dependencies provided by SDX. For example, Knox - this will be important when connecting to our instance.
Once the cluster has started we need to collect some configuration details. This is best done on the Datahub information page and in the Cloudera Manager Console. We will use the Phoenix thin driver, and this requires a JDBC string of the form.
Add the driver JAR using add File and select the JAR downloaded from the Cloudera repository Note: Don't search for class as it may automatically discover an invalid Driver class. The Class name configuration will override this. You may need to restart DBeaver, if the class is set incorrectly.
Close the configuration and test the connection.
The URL uses Knox so that access control can be managed centrally. Knox takes the https:// messages and proxies them through to the backend Phoenix services automatically.
A note on Operational Database Experience
Shortly we will be providing an Operational Database Experience. We have significantly streamlined the provisioning of the Datahubs and publish a lot more metadata to help with configuring external clients. For example, the Maven links to the correct clients are provided directly and examples of the JDBC links are presented right in the user interface.
All of these improvements have been made to help make provisioning new instances easy, and to make connecting to those instances from applications and tools very quick. Our objective is to help you integrate CDP with your applications quickly and efficiently. We welcome your feedback on areas of our platform and documentations, which can be improved to help us with this goal.
If you receive 404 or 401 errors, please check you are connecting to Knox, and that the full https:// url is correct.
If you receive errors related to serialisation, make sure you have serialization=PROTOBUF set.