Compile and run the Hive JDBC client code to load some data. (We haven't figured out how to do this in report designer yet.) See the sample code in Hive Client for loading the data.
+
Run the Report Designer (note step 2).
+
+
+
Select 'Report Design Wizard'.
+
Select a template - say 'fall template' - next.
+
Create a new data source - JDBC (custom), Generic database.
+
Provide Hive JDBC parameters. Give the connection a name 'hive'.
+
+
+
Click on 'Test'. The test should succeed.
+
Edit the query: select 'Sample Query', click edit query, click on the connection 'hive'. Create a new query. Write a query on the table testHiveDriverTable: eg: select * from testHiveDriverTable. Click next.
+
Layout Step: Add PageOfPages to Group Items By. Add key and value as Selected Items. Click next. And Finish.
+
Change the Report header to 'hive-pentaho-report'. Change the type of the header to 'html'.
Select 'Drivers -> New Driver...' to register the Hive JDBC driver.
+
+
Enter the driver name and example URL:
+
+
+
+
+
+
Select 'Extra Class Path -> Add' to add the following jars from your local Hive and Hadoop distribution. You will need to build Hive from the trunk after the commit of HIVE-679.
+
+
+
Select 'List Drivers'. This will cause SQuirrel to parse your jars for JDBC drivers and might take a few seconds. From the 'Class Name' input box select the Hive driver:
+
+
+
Click 'OK' to complete the driver registration.
+
+
Select 'Aliases -> Add Alias...' to create a connection alias to your Hive server.
+
+
Give the connection alias a name in the 'Name' input box.
+
Select the Hive driver from the 'Driver' drop-down.
+
Modify the example URL as needed to point to your Hive server.
+
Leave 'User Name' and 'Password' blank and click 'OK' to save the connection alias.
+
+
+
To connect to the Hive server, double-click the Hive alias and click 'Connect'.
+
+
+
+
When the connection is established you will see errors in the log console and might get a warning that the driver is not JDBC 3.0 compatible. These alerts are due to yet-to-be-implemented parts of the JDBC metadata API and can safely be ignored. To test the connection enter SHOW TABLES in the console and click the run icon.
+
+
Also note that when a query is running, support for the 'Cancel' button is not yet available.
+
+
+
Hive JDBC Client
+
+
Hive JDBC Client Setup for a Secure Cluster
+
+
To configure Hive on a secure cluster, add the directory containing hive-site.xml to the CLASSPATH of the JDBC client.