Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To see how the JDBC interface can be used, see sample code.

Integration with Pentaho

  1. Download pentaho report designer from the pentaho website
  2. Overwrite report-designer.sh with the code provided below.
    Code Block
    #!/bin/sh
    
    HADOOP_CORE={{ls $HADOOP_HOME/hadoop-*-core.jar}}
    CLASSPATH=.:$HADOOP_CORE:$HIVE_HOME/conf
    
    for i in ${HIVE_HOME}/lib/*.jar ; do
      CLASSPATH=$CLASSPATH:$i
    done
    
    CLASSPATH=$CLASSPATH:launcher.jar
    
    echo java -XX:MaxPermSize=512m -cp $CLASSPATH -jar launcher.jar
    java -XX:MaxPermSize=512m -cp $CLASSPATH org.pentaho.commons.launcher.Launcher
    
  3. Build and start the hive server with instructions from HiveServer
  4. Compile and run the hive jdbc client code to load some data (I haven't figured out how to do this in report designer yet). See sample code for loading the data.
  5. Run the report designer (note step 2)
    Code Block
    $ sh reporter-designer.sh
    
  6. Select 'Report Design Wizard'
  7. select a template - say 'fall template' - next
  8. create a new data source - JDBC (custom), Generic database
  9. Provide hive jdbc parameters. Give the connection a name 'hive'.
    Code Block
       URL: jdbc:hive://localhost:10000/default
       Driver name: org.apache.hadoop.hive.jdbc.HiveDriver
       Username and password are empty
    
  10. Click on 'Test'. The test should succeed
  11. 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.
  12. Layout Step: Add PageOfPages to Group Items By. Add key and value as Selected Items. Click next. And Finish.
  13. Change the Report header to 'hive-pentaho-report'. Change the type of the header to 'html'
  14. Run the report and generate pdf. You should get something like the report attached here.

...