Querying Function Details
This section describes how to retrieve the metadata of a single function from LakeFormation by its name.
Prerequisites
- The SDK has been installed. For details, see Obtaining and Installing the Catalog SDK.
- The target function is available in the corresponding database.
Function Signature
client.get_function(*, database=None, name) -> Function
Parameter Description
| Parameter | Mandatory (Yes/No) | Type | Default Value | Description |
|---|---|---|---|---|
| database | No | str | None | default_database | Database name. If this parameter is set to None, the default database is used. |
| name | Yes | str | - | Name of a function. |
Return Value
Returns a Function object containing fields such as function_name, resource_uris, version_id, parameters and class_name.
Exception Description
| Exception | Trigger Condition |
|---|---|
| FunctionNotFoundError | The specified function does not exist. |
| LakeFormationAPIError | Failed to call the LakeFormation API (due to network issues, authentication failures, 5xx errors, or other exceptions). |
Sample Code
func = client.get_function(name="to_celsius") print(func.function_name, func.version_id) print(func.parameters.signature.to_dict())
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot