調用此介面,可以分頁擷取資料開發中的udf函數列表,也可以使用篩選條件式篩選udf函數。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dataworks:* |
list |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ProjectId |
integer |
是 |
DataWorks 工作空間的 ID。您可以登入 DataWorks 控制台,進入工作空間管理頁面擷取 ID。 該參數用來確定本次 API 呼叫操作使用的 DataWorks 工作空間。 |
12345 |
| Owner |
string |
否 |
篩選條件:udf 函數的負責人 ID |
110755000425XXXX |
| Type |
string |
否 |
篩選條件:函數類型 可選值:
|
Math |
| Name |
string |
否 |
篩選條件:udf 函數名稱,支援模糊搜尋。 |
test |
| PageNumber |
integer |
否 |
分頁的頁數。預設值為 1,最小值為 1。 |
1 |
| PageSize |
integer |
否 |
每頁顯示的資料條數,預設為 10 條,最大為 100 條。 |
10 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。用於出現錯誤後排查問題。 |
89FB2BF0-EB00-5D03-9C34-05931001XXXX |
| PagingInfo |
object |
分頁資訊 |
|
| TotalCount |
integer |
滿足條件的資料總條數。 |
294 |
| PageNumber |
integer |
請求的資料頁數,用於翻頁。 |
1 |
| PageSize |
integer |
每頁顯示的條數 |
10 |
| Functions |
array<object> |
函數列表 |
|
|
array<object> |
函數列表元素資訊 |
||
| Name |
string |
udf 函數名稱 |
Function name |
| CreateTime |
integer |
udf 函數建立時間戳記 |
1655953028000 |
| ProjectId |
integer |
udf 函數所在的專案 ID |
307XXX |
| Owner |
string |
udf 函數的責任人 |
110755000425XXXX |
| Type |
string |
udf 函數類型 可選值:
|
Math |
| ModifyTime |
integer |
修改時間 |
1655953028000 |
| ClassName |
string |
udf 函數的全限定類名 |
com.demo.Main |
| ArmResource |
string |
ARM 叢集資源檔列表 |
xxx.jar,yyy.jar |
| FileResource |
string |
函數的實現代碼,資源檔列表 |
xxx.jar,yyy.jar |
| Description |
string |
對於函數的總體描述 |
Description |
| CommandDescription |
string |
命令描述 |
testUdf(xx,yy) |
| ParameterDescription |
string |
參數描述 |
xx: parameter information XXX yy: parameter information YYY |
| ReturnValueDescription |
string |
傳回值說明 |
The return value is a string. |
| ExampleDescription |
string |
樣本說明 |
Example description >>> select tsetUdf(xx,yy); abc |
| EmbeddedCodeType |
string |
嵌套代碼類型 可選值
|
Python2 |
| EmbeddedResourceType |
string |
嵌套資源類型 可選值
|
File |
| EmbeddedCode |
string |
嵌套函數代碼內容 |
print('hello,world!') |
| DatabaseName |
string |
資料庫名,僅當 Function 類型為 EMR Function 時使用 |
EMR_lake |
| DataSource |
object |
udf 函數資料來源資訊 |
|
| Name |
string |
資料來源名稱 |
odps_first |
| Type |
string |
資料來源類型 |
odps |
| Script |
object |
udf 函數指令碼資訊 |
|
| Path |
string |
指令碼路徑 |
XXX/OpenAPI/function/function_name |
| Runtime |
object |
運行時 |
|
| Command |
string |
命令 |
ODPS_FUNCTION |
| Id |
string |
指令碼 id。 重要 該欄位在 SDK8.0.0 版本之前為 Long 類型,SDK8.0.0 版本及之後為 String 類型。該變更不影響 SDK 正常使用,參數仍會按 SDK 中定義的類型返回。只有在跨 8.0.0 版本的 SDK 升級時,類型變更可能會導致專案編譯不通過,需要使用者手動修正資料類型。 |
652567824470354XXXX |
| RuntimeResource |
object |
運行時資源群組資訊 |
|
| ResourceGroupId |
string |
運行時資源群組 Id |
S_resgrop_xxx |
| Id |
string |
udf 函數唯一識別碼。 重要 該欄位在 SDK8.0.0 版本之前為 Long 類型,SDK8.0.0 版本及之後為 String 類型。該變更不影響 SDK 正常使用,參數仍會按 SDK 中定義的類型返回。只有在跨 8.0.0 版本的 SDK 升級時,類型變更可能會導致專案編譯不通過,需要使用者手動修正資料類型。 |
580667964888595XXXX |
樣本
正常返回樣本
JSON格式
{
"RequestId": "89FB2BF0-EB00-5D03-9C34-05931001XXXX",
"PagingInfo": {
"TotalCount": 294,
"PageNumber": 1,
"PageSize": 10,
"Functions": [
{
"Name": "Function name",
"CreateTime": 1655953028000,
"ProjectId": 0,
"Owner": "110755000425XXXX",
"Type": "Math",
"ModifyTime": 1655953028000,
"ClassName": "com.demo.Main",
"ArmResource": "xxx.jar,yyy.jar",
"FileResource": "xxx.jar,yyy.jar",
"Description": "Description",
"CommandDescription": "testUdf(xx,yy)",
"ParameterDescription": "xx: parameter information XXX\nyy: parameter information YYY",
"ReturnValueDescription": "The return value is a string.",
"ExampleDescription": "Example description >>> select tsetUdf(xx,yy);\nabc",
"EmbeddedCodeType": "Python2",
"EmbeddedResourceType": "File",
"EmbeddedCode": "print('hello,world!')",
"DatabaseName": "EMR_lake",
"DataSource": {
"Name": "odps_first",
"Type": "odps"
},
"Script": {
"Path": "XXX/OpenAPI/function/function_name",
"Runtime": {
"Command": "ODPS_FUNCTION"
},
"Id": "652567824470354XXXX"
},
"RuntimeResource": {
"ResourceGroupId": "S_resgrop_xxx"
},
"Id": "580667964888595XXXX"
}
]
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。