全部產品
Search
文件中心

MaxCompute:可視化管理資源

更新時間:Jun 09, 2026

MaxCompute Studio的Project Explorer提供了可視化編輯器,可以協助您快速在MaxCompute專案中添加註冊MaxCompute UDF所需的資源,例如表、JAR包、PY指令碼或壓縮包等,並提供擷取及刪除資源的入口。本文為您介紹如何通過Project Explorer可視化添加、擷取或刪除資源。

背景資訊

當您在MaxCompute Studio上執行註冊MaxCompute UDF操作時,需要提前將MaxCompute UDF依賴的資源檔上傳為MaxCompute專案的資源。MaxCompute Studio支援的資源操作如下:

添加資源

  1. 在IntelliJ IDEA介面的頂部功能表列,選擇MaxCompute > 添加資源

  2. Add Resource對話方塊配置下表所列參數資訊。

    • 添加非Table資源在 Add Resource 對話方塊中,選擇 MaxCompute project,將 Resource type 設定為 file,單擊 Resource file 右側瀏覽按鈕選擇檔案,填寫 Resource nameResource comment,勾選 Force update if already exists,單擊 OK

    • 添加Table資源在 Add Resource 對話方塊中,設定 MaxCompute project(選擇目標專案)、Resource type(選擇 table)、MaxCompute table(選擇目標表)、Table partition(按需填寫分區資訊)、Resource name(填寫資源名稱)和 Resource comment(可選備忘)。如需覆蓋同名資源,勾選 Force update if already exists,然後單擊 OK

    參數

    說明

    MaxCompute project

    待添加資源的MaxCompute專案名稱。

    如果MaxCompute Studio已與目標MaxCompute專案建立串連,您可以直接從下拉式清單選擇目標MaxCompute專案。如果下拉式清單未找到目標MaxCompute專案,您可以單擊右側添加表徵圖添加MaxCompute專案。

    Resource type

    資源類型。取值範圍如下:

    • file:File類型資源。支援的格式包括.zip、.so和.jar。

    • jar:編譯好的Java JAR包資源。

    • py:Python指令碼資源。

    • archive:壓縮包資源,支援的格式包括.zip、.tgz、.tar.gz、.tar和.jar。

    • table:表資源。您可以將MaxCompute專案中的表添加為資源。

    Resource file

    待添加的本地資源檔。僅當Resource typefilejarpyarchive時,需要從本地選擇資源檔。

    MaxCompute table

    待添加為資源的表。您可以在下拉式清單選擇目標表。當添加的資源為分區表時,MaxCompute僅支援將某個分區作為資源,不支援將整張分區表作為資源。

    Table partition

    待添加為資源的分區資訊。僅當MaxCompute table為分區表時,需要配置該參數。格式為partition_col1 = partition_col_value1, partition_col2 = partition_col_value2, ...

    Resource name

    新添加資源的名稱。

    Resource comment

    新添加資源的注釋資訊。

    Force update if already exists

    選中該項,表示當MaxCompute專案中存在同名資源時,新資源會替代舊資源。

  3. Add Resource對話方塊,單擊OK,完成資源添加。

  4. 按右鍵目標MaxCompute專案下的Resources,選擇Refresh meta更新資訊後,在列表中可以查看到新添加的資源。

擷取資源檔

在IntelliJ IDEA介面的左側導覽列,單擊Project Explorer,在目標MaxCompute專案的Resources下,按右鍵需要擷取資源檔的資源名稱,選擇Copy local meta path,即可複製資源檔所在路徑並在路徑下擷取到資源檔。

說明

不支援擷取表資源檔。

刪除資源

  1. 在IntelliJ IDEA介面的左側導覽列,單擊Project Explorer,在目標MaxCompute專案的Resources下,按右鍵需要刪除的資源,選擇Delete resource from server

  2. Confirmation Required對話方塊,單擊OK,即可從MaxCompute專案中刪除資源。

  3. 按右鍵目標MaxCompute專案下的Resources,選擇Refresh meta更新資訊後,列表中將無法查看到刪除的資源。