Catalog SDK Overview
This section describes the Python SDKs provided by the Catalog module of AI DataLake, including how to obtain and use the SDK.
Introduction to Catalog SDKs
SDK is short for Software Development Kit. It is a collection of software development tools provided for developers, including a series of APIs, tools, sample code, and documents. It helps developers quickly and efficiently develop various applications.
The AI DataLake Catalog Python SDK encapsulates REST APIs of LakeFormation and Object Storage Service (OBS) to simplify the registration, management, and development of user-defined functions (UDFs). It is designed for scenarios where UDF management and usage are separated. The Python UDFs registered using this SDK can be used by the Aura engine in AI DataLake. The SDK identifies the caller's identity using access keys, and provides capabilities such as automatic signing, type inference, UDF packaging and uploading, and metadata registration. This allows you to submit and manage scalar UDFs, UDTFs, UDAFs, and Data-Juicer operators through a unified client.
The core entry of the SDK is AIDatalake_Catalog_Client, which encapsulates the following capabilities:
- LakeFormation REST API calls (Function CRUD operations)
- OBS upload/deletion of UDF packages
- Type inference based on annotations of callable objects
- Packaging UDFs into ZIP files and uploading them
Features
| Capability | Method | Description |
|---|---|---|
| Registering scalar UDFs | create_udf | Registers scalar functions to LakeFormation, processing input columns row by row. |
| Registering UDTFs | create_udtf | Registers table functions to LakeFormation, allowing multiple rows and columns to be returned at once. |
| Registering UDAFs | create_udaf | Registers aggregate functions to LakeFormation, aggregating data across multiple rows. |
| Registering Data-Juicer operators | create_datajuicer_operator | Automatically adapts and registers the Filter/Mapper operators of Data-Juicer as scalar UDFs. |
| Querying functions | get_function | Retrieves function metadata from LakeFormation by name. |
| Listing functions | list_function | Lists all functions in a specified database. |
| Deleting functions | delete_function | Deletes function records from LakeFormation and clears their OBS packages. |
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