調用CreateUdfFile,在資料開發中建立函數類型檔案。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| FileFolderPath |
string |
否 |
函數檔案所在的檔案夾路徑。 |
Business_process/First_Business_Process/function/string_processing |
| ProjectId |
integer |
否 |
DataWorks 工作空間的 ID,您可以單擊頁面右上方的小扳手表徵圖,進入工作空間管理頁面查看。 |
10000 |
| FileName |
string |
是 |
函數的名稱。 |
StringConcat |
| FunctionType |
string |
是 |
函數的分類,對應建立函數表單中的函數類型一項,包括 MATH(數學運算函數)、AGGREGATE(彙總函式)、STRING(字串處理函數)、DATE(日期處理函數)、ANALYTIC(視窗函數)和 OTHER(其他函數)。 |
STRING |
| ClassName |
string |
是 |
函數定義所在的類名,對應建立函數表單的類名一項。 |
com.alibaba.DataWorks.api.udf.StringConcat |
| Resources |
string |
是 |
函數引用的資源名列表,對應建立表中的資源清單。多個資源名稱之間使用英文逗號(,)分隔。 |
string-concat-1.0.0.jar,commons-lang-2.6.jar |
| UdfDescription |
string |
否 |
函數用途的說明,對應建立函數表單中的描述。 |
Concatenate several strings to generate a new string |
| CmdDescription |
string |
否 |
函數調用的命令格式,對應建立函數表單中的命令格式。 |
StringConcat(String... substrs) |
| ParameterDescription |
string |
否 |
函數入參的說明,對應建立函數表單中的參數說明。 |
List of strings to be connected |
| ReturnValue |
string |
否 |
函數的傳回值說明,對應建立函數表單中的傳回值。 |
New strings generated by concatenating all strings before and after the input order |
| Example |
string |
否 |
函數調用樣本,對應建立函數表單中的樣本。 |
StringConcat('a', 'b', 'c') |
| ProjectIdentifier |
string |
否 |
DataWorks 工作空間的唯一識別碼,即資料開發頁面頂部切換工作空間處的英文標識。 |
dw_project |
| CreateFolderIfNotExists |
boolean |
否 |
當參數中指定的目錄(FileFolderPath)在系統中不存在時,是否自動建立此目錄。取值如下:
|
false |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| HttpStatusCode |
integer |
HTTP 狀態代碼。 |
200 |
| Data |
integer |
檔案建立成功後的 ID。 |
100000002 |
| RequestId |
string |
本次調用的唯一 ID。出現錯誤後,您可以根據該 ID 排查問題。 |
0000-ABCD-EFG**** |
| ErrorMessage |
string |
錯誤資訊。 |
The connection does not exist. |
| Success |
boolean |
調用是否成功。 |
true |
| ErrorCode |
string |
錯誤碼。 |
Invalid.Tenant.ConnectionNotExists |
樣本
正常返回樣本
JSON格式
{
"HttpStatusCode": 200,
"Data": 100000002,
"RequestId": "0000-ABCD-EFG****",
"ErrorMessage": "The connection does not exist.",
"Success": true,
"ErrorCode": "Invalid.Tenant.ConnectionNotExists"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | 沒有許可權,請授權 |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。