Before you use MaxCompute Studio to develop SQL programs, you must create a MaxCompute script module. This topic describes how to create a MaxCompute script module.

Background information

Create a MaxCompute script module in one of the following scenarios:
  • If no local script file exists, use IntelliJ IDEA to create a module.
  • If a local script file exists, you do not need to create a module. Instead, open a module and use MaxCompute Studio to edit the script.

Create a module if no local script file exists

  1. Start IntelliJ IDEA. In the top navigation bar, choose File > New > Project.
  2. In the left-side navigation pane of the New Project dialog box, click MaxCompute Studio. Then, click Next.
    New project
  3. Specify the Project name parameter and click Finish.
    Configure a project name
    Note

    If a project is opened, a dialog box appears and asks whether you want to open the new project in a new window or the current window. In this case, click This Window.

Create a module if a local script file exists

If a local script file exists, you do not need to create a module. You need only to add a MaxCompute connection configuration file to the existing module directory.

  1. In the .\IdeaProjects\MaxCompute_Studio_Project_Name\scripts folder, create a MaxCompute connection configuration file odps_config.ini and configure the following authentication information. This authentication information is used to connect to MaxCompute.
    # The name of the MaxCompute project.
    project_name=xxxxxxxx
    # The AccessKey ID of your Alibaba Cloud account.
    access_id=xxxxxxxxxx
    # The AccessKey secret of your Alibaba Cloud account.
    access_key=xxxxxxxxx
    # The endpoint of the region where your MaxCompute service is deployed.
    end_point=xxxxxxxxx
  2. Open IntelliJ IDEA. In the top menu bar, choose File > Open, and select the .\IdeaProjects\MaxCompute_Studio_Project_Name\scripts folder. Then, select the odps_config.ini file.
    Select a configuration file
    Note MaxCompute Studio automatically searches for the odps_config.ini file in the folder and captures the metadata on the MaxCompute server based on the configuration information in the file. MaxCompute Studio then compiles all scripts in the folder.