This topic describes how to configure MaxCompute JDBC on SQL Workbench/J.

Prerequisites

  • Download and install SQL Workbench/J. Click here to download SQL Workbench/J. SQL Workbench/J Build 125 (2019-05-08) is used in this topic.
  • Download the MaxCompute JDBC driver. Click here to download the MaxCompute JDBC driver. MaxCompute JDBC driver V3.0.1 is used in this topic.
  • Install Java 8 or later.

Background information

SQL Workbench/J is a typical general-purpose JDBC client tool. The procedure set out in this topic also can be used for configurations in other tools.
Note For any problems that occur when you use other tools to configure MaxCompute JDBC, report them to Issues.

Procedure

  1. Start SQL Workbench/J and click Manage Drivers to go to the corresponding page.
  2. Click to create a new JDBC driver.
  3. Set Name to MaxCompute.
  4. Click to upload the MaxCompute JDBC driver that you have downloaded. Classname will be automatically set to com.aliyun.odps.jdbc.OdpsDriver.
  5. Click OK and you return to the profile configuration page.
  6. Set URL, Username, and Password.
    • URL: must be in the jdbc:odps:<maxcompute_endpoint>? project=<maxcompute_project_name> format.
      • <maxcompute_endpoint> is the MaxCompute endpoint of your region. Example: http://service.odps.aliyun.com/api. For more information about MaxCompute endpoints, see Configure endpoints.
      • <maxcompute_project_name> is the name of your MaxCompute project.
    • Username: the AccessKey ID of the account used to create the project.
    • Password: the AccessKey secret of the account used to create the project.
  7. Click OK and you return to the SQL execution page. On this page, you can execute MaxCompute SQL statements.