# Squirrel SQL Install and Use With TD SQuirreL SQL is an open-source Java SQL Client program for any JDBC compliant database. You can use SQuirrelSQL as a SQL authoring tool to interactively develop SQL queries with Treasure Data. Your screens might be different from these. * [Install SQuirrel](#install-squirrel) * [Download Treasure Data JDBC Driver](#download-treasure-data-jdbc-driver) * [Add Treasure Data JDBC Driver](#add-treasure-data-jdbc-driver) * [Connect to Treasure Data](#connect-to-treasure-data) * [Issue the Query](#issue-the-query) # Install SQuirrel Download the latest SQuirreL SQL installer as a JAR file: * [SQuirrel SQL: Download and Installation](http://squirrel-sql.sourceforge.net/) After you execute the JAR file, the installer starts. Select **Next** to proceed through the installation. ![](/assets/image-20190926-193727.064c6b5fe669d7fb5d5ef348370b5e6e9de7a8df51eae0f92c660074747d0826.60bcc915.png) Only the Standard pack is required for Treasure Data. ![](/assets/image-20190926-193807.36e99493b92194c7dfc4ba4f4a58cdbbd038840fcdf04d45c7548cdf749de3b2.60bcc915.png) When the installation is complete, launch SQuirreL SQL. ![](/assets/image-20190926-193842.4de3fe4cfa3256c8bb5bfb23bdb5d4073565d6accae1a7d4e75378ad33ddda60.60bcc915.png) # Download Treasure Data JDBC Driver Download Treasure Data’s JDBC Driver: [JDBC Driver Download](https://api-docs.treasuredata.com/en/tools/hive/quickstart/#jdbc-parameter-precedence) Then, put the driver into the SQuirreL SQL's driver directory. ```bash $ mv td-jdbc-0.2.10-jar-with-dependencies.jar /Applications/SQuirreLSQL.app/Contents/Resources/Java/lib/ ``` The target directory is $SQUIRREL_SQL_INSTALL_PATH/lib/ on Windows and Linux. # Add Treasure Data JDBC Driver Select **Drivers** in the left pane, and select + (the plus sign) to add a new driver. ![](/assets/image-20190926-193933.43b37841230774f8f96bfd84c73d14f9552178187a8edafe94ffc0b2fc27b4b0.60bcc915.png) Complete the information as shown in the following example. ![](/assets/image-20190926-194037.7cbd2746ef8fad06618e5812c9b4b688b08fb4f161e4164362b5a865d3f10ee3.60bcc915.png) * Name: Treasure Data * Example URL: * Hive: jdbc:td://api.treasuredata.com/< database >;useSSL=true;type=hive * Presto: jdbc:td://api.treasuredata.com/< database >;useSSL=true;type=presto * Java Class Path: td-jdbc-xxx.jar * Class Name: com.treasuredata.jdbc.TreasureDataDriver # Connect to Treasure Data Select the Aliases tab on the left pane and select + (the plus sign) to add the Alias. ![](/assets/image-20190926-194148.77623ce0cede48db62b548e37ac161a3514de0100dc2dac0e539345fb50c1c7f.60bcc915.png) * Name: Whatever you like * Driver: Treasure Data * URL: jdbc:td://api.treasuredata.com/< YOUR_DATABASE_NAME >;useSSL=true * User Name: Your account email * Password: Your account password Select **Test** when the forms are filled. If the information is correct, you receive the message Connection is successful. ![](/assets/image-20190926-194247.4462526e81f2e910ad23e4025c88d3cd25dc3366570bcd35eea64c11f8a74121.60bcc915.png) Select **OK**. # Issue the Query You’ll see a list of tables and their columns by GUI. ![](/assets/image-20190926-194326.719fb1e669819b72229df000280dffbd178785df9d36452b43e44971fc50ba0a.60bcc915.png) Move to the SQL pane, and edit the SQL query to be thrown. Select `Ctrl + Enter` when the query is ready. The query runs and then shows the results. You can check the progress of the query from the TD Console. ![](/assets/image-20190926-194409.9ed1d272fbd11ee0553c1b1861fb8959468fff29b75ef48e5cd75de71ce2ebc1.60bcc915.png)