SQL Workbench is one of many applications that use drivers to query and view data. The instructions below provide general guidelines for configuring and using the Simba Athena JDBC Driver in SQL Workbench.

Before You Begin

Before you can use the driver in SQL Workbench, you must do the following:

  1. Download and install SQL Workbench.
  2. Download and extract the driver ZIP archive (SimbaAthenaJDBC-[Version].zip) into the SQL Workbench directory. Please contact us to request an evaluation.
  3. Set up the Athena service. For more information, see “Setting Up” in the
    Amazon Athena Documentation.

Configuring SQL Workbench to Use the Driver

Add the Simba Athena JDBC Driver to the list of drivers in SQL Workbench, and then create a connection profile that contains the necessary connection information.

To configure SQL Workbench to use the driver:

  1. In SQL Workbench, select File > Manage Drivers.
  2. In the Manage Drivers dialog box, specify the following values in the fields:
    01_Connecting_Athena_JDBC02_Connecting_Athena_JDBC
  3. Click OK to save your settings and close the Manage Drivers dialog box.
  4. Click File > Connect Window.
  5. In the Select Connection Profile dialog box, create a new connection profile named “Athena”.
  6. From the Driver drop-down list, select the driver that you configured in step 2. The driver is listed with the name that you specified in step 2, followed by the classname.
  7. To specify required connection information, specify the following values in the
    fields:
    03_Connecting_Athena_JDBC04_Connecting_Athena_JDBC
  8. Click Extended Properties, and add a property named S3OutputLocation. Set the value of this property to the path of the Amazon S3 location where you want to store query results, prefixed by s3://.
    For example, to store Athena query results in a folder named “test-folder-1” inside an S3 bucket named “query-results-bucket”, you would set the S3OutputLocation property to s3://query-results-bucket/testfolder-1.
  9. Click OK to save your settings and close the Edit Extended Properties dialog box.
  10. Click OK to save your connection profile and close the Select Connection Profile
    dialog box.

You can now use the Simba Athena JDBC Driver in SQL Workbench to query and view data.

Querying Data with SQL Workbench

Use the Statement window in SQL Workbench to execute queries on your data. You can also execute CREATE statements to add new tables, and create and use custom databases.

Note: By default, the driver queries the default database. To distinguish between tables in the default and custom databases, when writing your queries, use the database identifier as a namespace prefix to your table name.

To query data with SQL Workbench:

  1. In the Statement window, type a query that creates a table in the default database. For example:
  2. Click Execute.
  3. Run a simple query to retrieve some data, and then view the results. For example:

You can now view details about the retrieved data in the Data Explorer tab, as described below.

Exploring Data with SQL Workbench

Use the Data Explorer tab to view details about your retrieved data.

To explore data with SQL Workbench:

  1. Select the Data Explorer tab, and then select the default schema (or database).
  2. Select the integer_table table. SQL Workbench loads the Columns tab, which shows the table schema.
    05_Connecting_Athena_JDBC
  3. Select the other tabs to view more information about the integer_table table. For example:
    a. Select the SQL Source tab to view the queries that were used to generate the table.

    06_Connecting_Athena_JDBC
    b. Select the Data tab to view a list of the rows returned from the table.
    07_Connecting_Athena_JDBC

You can repeat the procedures described above to retrieve and explore different data using the Simba Athena JDBC Driver in SQL Workbench.