The Project Explorer in MaxCompute Studio provides a visual interface for managing resources for your MaxCompute UDFs. You can add, retrieve, and delete resources such as tables, JAR files, Python scripts, and archives directly within the IDE.
Background information
To register a MaxCompute UDF, you must first upload its dependencies, such as libraries or data files, as resources to your MaxCompute project. MaxCompute Studio supports the following resource operations:
Add a resource
In the IntelliJ IDEA menu bar, choose .
In the Add Resource dialog box, configure the following parameters.
To add a file-based resource: In the Add Resource dialog box, select a MaxCompute project and set Resource type to file. Click the browse button next to Resource file to select a local file. Enter a Resource name and an optional Resource comment. To overwrite an existing resource with the same name, select Force update if already exists, and then click OK.
To add a table resource: In the Add Resource dialog box, select the target MaxCompute project and set Resource type to table. Select the target table from the MaxCompute table drop-down list. If required, specify the partition information in the Table partition field. Enter a Resource name and an optional Resource comment. To overwrite an existing resource with the same name, select Force update if already exists, and then click OK.
Parameter
Description
MaxCompute project
The MaxCompute project where you want to add the resource.
If MaxCompute Studio is connected to the target project, you can select it from the drop-down list. If the project is not listed, click the
icon on the right to add it.Resource type
The type of the resource. Valid values:
file: A file-type resource. Supported formats include .zip, .so, and .jar.
jar: A JAR file.
py: A Python script.
archive: An archive. Supported formats include .zip, .tgz, .tar.gz, .tar, and .jar.
table: A MaxCompute table that is used as a resource.
Resource file
The local resource file to add. This parameter is required only when Resource type is set to file, jar, py, or archive.
MaxCompute table
The table to use as a resource. You can select the target table from the drop-down list. For a partitioned table, you can add only a specific partition as a resource, not the entire table.
Table partition
The partition specification. This parameter is required only if MaxCompute table specifies a partitioned table. The format is
partition_col1 = partition_col_value1, partition_col2 = partition_col_value2, ....Resource name
The name of the resource.
Resource comment
An optional comment for the resource.
Force update if already exists
Overwrites an existing resource that has the same name in the MaxCompute project.
In the Add Resource dialog box, click OK to add the resource.
Right-click Resources under the target MaxCompute project and select Refresh meta. The new resource appears in the list.
Retrieve a resource file
In the Project Explorer, navigate to the Resources folder under your target MaxCompute project. Right-click the resource that you want to retrieve and select Copy local meta path. This copies the local path of the resource file.
You cannot retrieve files for table resources.
Delete a resource
In Project Explorer, expand the Resources folder under the target MaxCompute project. Right-click the resource that you want to delete and select Delete resource from server.
In the Confirmation Required dialog box, click OK.
Right-click Resources under the target MaxCompute project and select Refresh meta. The resource is removed from the list.