SQL Workbench/J is a free, DBMS-independent, cross-platform SQL query tool. You can use SQL Workbench/J as SQL authoring tool to interactively develop SQL queries with Treasure Data.

This article is created using a Mac OS. Your screens may differ on Windows and Linux.


Download the latest SQL Workbench/J installer from below, and install the application.

Follow the instructions at Installing and starting SQL Workbench/J.

SQL Workbench/J requires Java 7 or higher.

Download Treasure Data JDBC Driver

Download Treasure Data’s JDBC Driver from:

JDBC Driver for Presto

Add the Treasure Data JDBC Driver

Select File at the top menu, and click Manage Drivers. Edit the forms:

  • Name: Treasure Data

  • Library: JDBC driver file path

  • Classname: com.treasuredata.jdbc.TreasureDataDriver

  • Sample URL

    • Hive: jdbc:td://api.treasuredata.com/< database >;useSSL=true;type=hive

    • Presto: jdbc:td://api.treasuredata.com/< database >;useSSL=true;type=presto

Connect to Treasure Data

Click File at the top menu, and click Connect Window. Edit forms:

  • Name: Whatever you like

  • Driver: Treasure Data

  • URL: jdbc:td://api.treasuredata.com/sample_db;useSSL=true

  • Username: Your account email

  • Password: Your account password

  • Read only: True

Click OK to add the connection.

Issue the Query

You’ll see a list of tables and its columns by GUI.

Click the Statement tab, and edit the SQL query to be thrown.

Ctrl + Enter after the query is ready, then the query runs and shows the results.

You can check the progress of the query from TD Console.

  • No labels