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.
- Basic knowledge of Treasure Data.
You can download Pentaho Data Integration (Kettle) from the link below. Version 8.2 was tested for this article
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.
Treasure Data JDBD driver is deprecated.
Before starting Pentaho Data Integration, please copy the Treasure Data JDBC driver to the lib directory specified by Pentaho Data Integration.
$ cp td-jdbc-VERSION-jar-with-dependencies.jar \
pentaho-data-integration-install/data-integration/libConnect Treasure Data to Pentaho Data Integration’s database connection and make a new transformation. Please follow the procedure below.
- Open the Pentaho DI application.
2. Select File > New > Transformation

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:jdbc:td://api.treasuredata.com/<db\_name>- use
jdbc:td://api.treasuredata.com/<db\_name>;useSSL=Trueif you want to enforce SSL - You can choose the query engine Hive or Presto (default) by the parameter
- jdbc:td://api.treasuredata.com/sample_db;useSSL=true;type=hive
- jdbc:td://api.treasuredata.com/sample_db;useSSL=true;type=presto
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.

- Select Table Input from the transform’s Input menu.
- Drag and drop onto the workspace as follows:

- 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.
To confirm the behavior of the Table input, send your data on Treasure Data to JSON output as follows:

Check ‘start-pentaho.bat’ or ‘start-pentaho.sh’, and add the following parameters to CATALINA_OPTS option:
CATALINA_OPTS="-Dhttp.proxyHost=proxy address -Dhttp.proxyPort=proxy port"