Queries the specified user-defined function (UDF) in a metadatabase in Data Lake Formation (DLF) by name.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request parameters.
Request syntax
GET /api/metastore/catalogs/databases/functions
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
CatalogId | String | Query | No | 1344371 | The catalog ID of the metadatabase. Default value: the user ID of your Alibaba Cloud account. |
DatabaseName | String | Query | No | database_test | The name of the metadatabase. |
FunctionName | String | Query | No | func2 | The name of the UDF. |
RegionId | String | Host | No | cn-hangzhou | The ID of the region where DLF is activated. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | OK | The description of the status code. |
Function | Function | The details about the UDF. | |
Message | String | . | The error message that is returned. |
RequestId | String | B7F4B621-E41E-4C84-B97F-42B5380A32BB | The ID of the request. |
Success | Boolean | true | Indicates whether the call was successful. |
Error codes
InternalError: An internal error has occurred. Troubleshoot the error based on the error message that is returned.
Examples
Sample requests
GET /api/metastore/catalogs/databases/functions HTTP/1.1
{
"FunctionName":"func2",
"DatabaseName":"database_test",
"RegionId":"cn-hangzhou",
"CatalogId":"1344371"
}
Sample success responses
JSON
format
{
"Code": "OK",
"Function": {
"CatalogId": "1344371",
"ClassName": "com.xxx.xxxxFunction",
"CreateTime": 1608863962,
"DatabaseName": "database_test",
"FunctionName": "func2",
"FunctionType": "JAVA",
"OwnerName": "zhangsan",
"OwnerType": "USER",
"ResourceUri": [
{
"ResourceType": "JAR",
"Uri": "hdfs:///tmp/jar1.jar"
}
],
"UpdateTime": 1608863962
},
"HttpStatusCode": 200,
"Message": "",
"RequestId": "1A894339-A288-4FE6-811F-6E14B4F62704",
"Success": true
}