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.
For more information about how to configure MaxCompute Studio, see Configure MaxCompute Studio.
Step 1: Create a MaxCompute Studio project
Start IntelliJ IDEA. From the main menu, select .
In the left navigation pane of the New Project dialog box, select MaxCompute Studio and click Next.
Enter a Project name and click Finish to create the project.
NoteIf 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
From the main menu, select .
In the upper-left corner, click + and select Add project from accessId/Key.
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).
NoteClick 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.
NoteIf no accounts are listed, on the Accounts page, click 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.
NoteThis 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.
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
In the Project Explorer panel, right-click the MaxCompute project that you want to modify and select Modify project properties.
In the Modify MaxCompute project dialog box, modify the project's configuration.
Next steps
After you connect to the MaxCompute project, you can:
Manage and view the data and resources in the project. For more information, see Manage data and resources.
Develop SQL programs in MaxCompute Studio. For more information, see Develop SQL programs.
Develop Java programs in MaxCompute Studio. For more information, see Develop Java programs.
Develop Python programs in MaxCompute Studio. For more information, see Develop Python programs.
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>'.orTest 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:
Log on to the MaxCompute console. On the Workspace > Projects page, obtain the correct name of the MaxCompute project, and then modify the Project Name parameter.
If other users need to connect to the project, the project owner must add them. For more information, see Add an Alibaba Cloud account (project-level) or Add a RAM user (project-level).
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.