This article examplins how to use Treasure Data with Pentaho Data Integration using presto-jdbc driver. By combining Treasure Data with Pentaho, users can scale their existing Pentaho Data Integration environment to handle huge volumes of data.
Continue to the following topics:
Basic knowledge of Treasure Data.
Don't have time to set up Pentaho + Treasure Data? Leverage our Setup Consultation Service.
Download Pentaho Data Integration (Kettle)
You can download Pentaho Data Integration (Kettle) from the link below. Version 8.2 was tested for this article
Download JDBC Driver
You can download the driver from the link below. The driver is still in beta; any feedback is appreciated.
To work with Pentaho, you must use td-jdbc-VERSION-jar-with-dependencies.jar file.
This driver works only with Treasure Data. It does not work with other environments such as your local Hadoop/Hive cluster.
Copy JDBC Driver Jar to Pentaho Data Integration
Before starting Pentaho Data Integration, please copy the Treasure Data JDBC driver to the
lib directory specified by Pentaho Data Integration.
Create Treasure Data Database Connection
Connect Treasure Data to Pentaho Data Integration’s database connection and make a new transformation. Please follow the procedure below.
Create a New Transform
Open the Pentaho DI application.
Select File > New > Transformation
Create New Database Connection
Navigate to Tools > Wizard > Create database connection.
Edit the details in the pop-up dialog.
Name the database connection
Select Generic Database for type of database
Select Native (JDBC) for type of database access
Specify the connection’s URL (view API endpoints) and the name of the driver class.
- Driver class is com.treasuredata.jdbc.TreasureDataDriver
The URL can be specified in any of the following ways:
use jdbc:td://api.treasuredata.com/<db_name>;useSSL=True if you want to enforce SSL
Specify your username and password. Use your Treasure Data credentials for these fields (Your User Name is the email address used to register on Treasure Data).
Select Test database connection.
Use Treasure Data Database as Table Input
Specify Table Input
- Select Table Input from the transform’s Input menu.
- Drag and drop onto the workspace as follows:
Edit the Table Input
- Right-click the Table input icon on the workspace.
- Select Edit from the context menu.
- Configure your Table input as follows:
The preceding query is reviewed in the JasperSoft iReport with JDBC Driver article.
Confirm the Table Input
To confirm the behavior of the Table input, send your data on Treasure Data to JSON output as follows:
Tip: How can I use Pentaho through a proxy?
Check ‘start-pentaho.bat’ or ‘start-pentaho.sh’, and add the following parameters to CATALINA_OPTS option: