All Products
Search
Document Center

MaxCompute:Create a MaxCompute script module

Last Updated:Mar 26, 2026

MaxCompute's SQL engine supports script mode, where a multi-statement SQL script is compiled and submitted as a whole to generate a single execution plan. The script queues and executes only once, making full use of available resources. MaxCompute Studio uses script mode when you develop SQL programs in IntelliJ IDEA, and it requires a script module to work.

Prerequisites

Before you begin, ensure that you have:

  • IntelliJ IDEA installed on your development machine

  • The MaxCompute Studio plugin installed in IntelliJ IDEA

  • Your MaxCompute project name

  • Your Alibaba Cloud AccessKey ID and AccessKey secret — get these from the AccessKey Management page in the Alibaba Cloud console

  • The endpoint of the region where your MaxCompute service is deployed — see Endpoints

Choose your setup path

How you set up the script module depends on whether you already have a local script:

SituationWhat to do
No local script existsCreate a new script module in IntelliJ IDEA
A local script already existsAdd a connection configuration file to the existing directory — no new module needed

Create a script module when no local script exists

  1. Start IntelliJ IDEA. In the menu bar, choose File > New > Project.

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

    Create a project

  3. Specify a Project name and click Finish.

    If a project is already open, a dialog box appears asking whether to open the new project in a new window or the current window. Click This Window.

    Configure a project name

Create a connection configuration when a local script exists

If you already have a local script, skip creating a new module. Instead, add a connection configuration file to the existing module directory so MaxCompute Studio can connect to your project.

  1. In the .\IdeaProjects\MaxCompute_Studio_Project_Name\scripts folder, create a file named odps_config.ini with the following content:

    # The name of the MaxCompute project to connect to.
    project_name=<your-project-name>
    # Your Alibaba Cloud AccessKey ID.
    access_id=<your-access-key-id>
    # Your Alibaba Cloud AccessKey secret.
    access_key=<your-access-key-secret>
    # The endpoint of the region where your MaxCompute service is deployed.
    end_point=<your-endpoint>

    Replace the placeholders with your actual values:

    PlaceholderDescriptionWhere to find it
    <your-project-name>Name of your MaxCompute projectMaxCompute console > Projects
    <your-access-key-id>AccessKey ID of your Alibaba Cloud accountAccessKey Management
    <your-access-key-secret>AccessKey secret of your Alibaba Cloud accountAccessKey Management
    <your-endpoint>Endpoint for the region where MaxCompute is deployedEndpoints
  2. In IntelliJ IDEA, choose File > Open, then select the odps_config.ini file from the .\IdeaProjects\MaxCompute_Studio_Project_Name\scripts folder. MaxCompute Studio automatically reads the configuration file, fetches project metadata from the MaxCompute server, and compiles all scripts in the folder.

    Select the configuration file