Membuat fungsi yang ditentukan pengguna (UDF) di DataStudio. Informasi tentang UDF dijelaskan menggunakan FlowSpec.
Deskripsi operasi
This API does not support batch operations. If you define more than one UDF in the FlowSpec, all UDFs except the first one are ignored.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
ID ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman ruang kerja untuk mengkueri ID tersebut. |
12345 |
| Spec |
string |
Yes |
Informasi bidang FlowSpec tentang UDF. Untuk informasi selengkapnya, lihat FlowSpec. |
{ "version": "1.1.0", "kind": "Function", "spec": { "functions": [ { "name": "function name", "script": { "content": "{\"name\": \"function name\", \"datasource\": {\"type\": \"ODPS\", \"name\": \"ODPS_first\"}, \"runtimeResource\": {\"resourceGroup\": \"s_res_group_xx_xxxx\"}}", "path": "XXX/OpenAPI/function/function name", "runtime": { "command": "ODPS_FUNCTION" } }, "datasource": { "name": "ODPS_first", "type": "ODPS" }, "runtimeResource": { "resourceGroup": "S_res_group_XXXX_XXXX" } } ] } } |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. You can locate logs and troubleshoot issues based on the ID. |
AE49C88D-5BEE-5ADD-8B8C-C4BBC0D7**** |
| Id |
string |
The unique identifier of the UDF function. Catatan
Prior to SDK version 8.0.0, this field is of type Long. In SDK version 8.0.0 and later, it is of type String. This change does not affect the normal use of the SDK. The parameter is returned based on the type defined in the SDK. Compilation failures caused by the type change may occur only when you upgrade the SDK across version 8.0.0. In this case, you must manually update the data type. |
580667964888595XXXX |
Contoh
Respons sukses
JSONformat
{
"RequestId": "AE49C88D-5BEE-5ADD-8B8C-C4BBC0D7****",
"Id": "580667964888595XXXX"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.