Manage project connections

更新时间:
复制 MD 格式

To use MaxCompute Studio for data development, you must first connect to a MaxCompute project. This connection allows you to view and manage your MaxCompute data and resources. This topic describes how to create and modify MaxCompute project connections.

Prerequisites

You have successfully installed MaxCompute Studio.

Note

For more information about how to configure MaxCompute Studio, see Configure MaxCompute Studio.

Step 1: Create a MaxCompute Studio project

  1. Start IntelliJ IDEA. From the main menu, select File > New > Project.

  2. In the left navigation pane of the New Project dialog box, select MaxCompute Studio and click Next.

  3. Enter a Project name and click Finish to create the project.

    Note

    If a project is already open, you are prompted whether to open the new project in the current window. Click This Window to close the existing project and open the new one.

Step 2: Create a MaxCompute project connection

  1. From the main menu, select View > Tool Windows > Project Explorer.

  2. In the upper-left corner, click + and select Add project from accessId/Key.

  3. In the Add MaxCompute project dialog box, configure the parameters on the Connection tab.

    The parameters to configure are Properties File, AK Account, AccessKey ID (required), AccessKey Secret (required), Project Name (required), and Endpoint (required).

    Note
    • Click the 帮助 icon in the lower-left corner of the dialog box to view the online documentation.

    • If a timeout error occurs, click the Setting tab and modify the data synchronization parameters:

      • sync one table timeout(s): The timeout for table synchronization. Default: 5s.

      • sync one function timeout(s): The timeout for user-defined function (UDF) synchronization. Default: 30s.

    • Automatically populate parameters from a configuration file.

      Parameter

      Description

      Properties File

      Upload the odps_config.ini configuration file for the MaxCompute client (odpscmd). For more information, see Install and configure the MaxCompute client. This file initializes the AccessKey ID, AccessKey Secret, Project Name, and Endpoint parameters.

      AK Account

      The Alibaba Cloud account used to connect to the MaxCompute project. Click + on the right and select an existing account on the Accounts page.

      Note

      If no accounts are listed, on the Accounts page, click + > Aliyun Account By AccessKey to add an account either automatically from a configuration file or manually. For more information about how to configure accounts, see Accounts configuration options.

    • Manually configure the parameters.

      Parameter

      Description

      AccessKey ID

      The AccessKey ID used to connect to the MaxCompute project.

      AccessKey Secret

      The AccessKey Secret used to connect to the MaxCompute project.

      Project Name

      The name of the target MaxCompute project.

      Note

      This parameter specifies the name of an existing MaxCompute project, not a DataWorks workspace. You can log on to the MaxCompute console and go to the Workspace > Projects page to view the names of your MaxCompute projects or create a new project.

      Endpoint

      The endpoint of the region where the MaxCompute project is located. Note that if you are connecting from outside the Alibaba Cloud internal network (for example, from your local computer), you must use a public endpoint.

  4. After you complete the configuration, click OK. The Project Explorer panel on the left displays the MaxCompute project information, including its tables, views, user-defined functions (UDFs), and resources.

Step 3: Modify a MaxCompute project connection

  1. In the Project Explorer panel, right-click the MaxCompute project that you want to modify and select Modify project properties.

  2. In the Modify MaxCompute project dialog box, modify the project's configuration.

Next steps

After you connect to the MaxCompute project, you can:

Troubleshooting

The following common errors might occur after you configure the parameters on the Connection tab and click OK:

  • Error: Test connection fail: ODPS-0420111: Project not found - '<project_name>'. or Test connection fail:ODPS-0130013:Authorization exception - Authorization Failed [4002], You don't exist in project <project_name>. Context ID:<context ID>. --->Tips: Principal:ALIYUN$<account_name> | RAM$[<account_name>:]<RAM_user_name>;.

    • Possible causes:

      • The target project does not exist, or the project name is incorrect.

      • The Alibaba Cloud account or RAM user associated with the AccessKey ID is not added to the target project.

    • Solutions:

  • Error: Test connection fail: connect timed out, the possible reason is that the endpoint '<endpoint>' is wrong, please check your endpoint.

    • Possible cause: You entered an incorrect value for the Endpoint parameter. For example, you are connecting from your local computer over the public internet but specified an internal network endpoint.

    • Solution: Refer to the Endpoints documentation and select an endpoint that matches the region of your project and your network environment.

  • Error: Test connection fail: The specified project or table name is not valid or missing. .

    • Possible cause: Endpoints are used for MaxCompute services, while tunnel endpoints are used for MaxCompute Tunnel services. You likely specified a tunnel endpoint for the Endpoint parameter.

    • Solution: Refer to the Endpoints documentation. Select an endpoint that matches the region of your project and your network environment. Do not use a tunnel endpoint.