Multimodal Data Processing Using Aura DataFrame
Scenarios
The multimodal data engine Aura is designed to analyze multimodal data. It supports on-the-fly data processing, eliminating the need for the frequent data storage operations required by traditional methods. This enables pipeline execution of preprocessing steps, such as video decoding and vectorization. It provides user-defined functions (UDFs) to meet customized data processing requirements in multimodal scenarios.
This section uses table data processing as an example to describe how to use the AuraJobV2 engine in AI DataLake and DataArts Studio Notebook to interactively process and analyze data.
During job development, you can use the Aura DataFrame SDK built into the DataArts Studio Notebook image. You can directly use magic commands to create a connection.
DataArts Studio Notebook currently has restricted access. To use it, submit a service ticket to request activation.
Preparations
- You have registered an account and completed real-name authentication. The account balance is sufficient, and the account is not frozen.
- You have enabled AI DataLake and obtained the required permissions for the cloud resources.
- You have enabled LakeFormation, obtained OBS permissions, and configured the required agency.
- You have enabled DataArts Studio and created an instance and a workspace within the service.
- You have purchased a Notebook resource group and created a Notebook instance.
Procedure
This section describes the basic development workflow for AuraJobV2 jobs. The procedure is as follows:
- Prepare the environment.
- Create a workspace on the AI DataLake console to provide an independent environment for running jobs.
- Create a compute resource pool on the AI DataLake console to provide compute resources for running jobs.
- Create an endpoint on the AI DataLake console and associate the AuraJobV2 engine with the compute resource pool.
- Associate compute resources and develop data.
- Associate Aura compute resources on the Notebook page or in the DataArts Studio console.
- On the Notebook page, select the associated Aura compute resources for the current notebook.
- On the Notebook interactive development page, use the %aura_frame magic command to connect to the AuraJobV2 endpoint.
- Register operators.
Register data processing operators and build a data processing pipeline.
Use table processing operators to process tabular data.
- Run a job and view the result.
- Execute operators to process data.
- View the execution result on the Notebook interactive development page.
Step 1: Plan and Create an OBS Parallel File System
AI DataLake AuraJobV2 uses OBS to store data. You must create a bucket and a folder on the OBS console and import sample data.
- Log in to the Huawei Cloud OBS console.
- Choose Parallel File Systems and click Create Parallel File System. On the displayed page, set the parameters, and click Create Now.
- File System Name: Set the name of the parallel file system as required, for example, aura-serverless.
- Configure other parameters based on your business requirements.
- On the Parallel File Systems page, click the name of the created parallel file system, for example, aura-serverless.
- In the left navigation pane, choose Files. Click Create Folder, enter a folder name, and then click OK. You can enter a multi-level path (separate folder names with slashes (/)) to create nested folders all at once. For example:
- Catalog storage path: aura-serverless/catalog1
- Database storage path: aura-serverless/catalog1/database1
Step 2: Plan and Create a LakeFormation Instance, Catalog, and Database
AI DataLake AuraJobV2 manages data sources using LakeFormation. You must purchase a LakeFormation instance and configure its catalog and database settings.
- Log in to the Huawei Cloud LakeFormation console.
- In the upper right corner of the Overview page, click Buy Instance, and configure the required parameters to purchase a LakeFormation instance. For details, see Creating a LakeFormation Instance.
- In the upper left corner, select the target instance from the drop-down list.
- Create a catalog.
- In the left navigation pane, choose Data Catalogs.
- On the Data Catalog page, click Create. On the page that appears, set the following parameters, and click Submit.
Parameter
Example Value
Description
Catalog Name
lakeformation_for_auratest
The name of the catalog to create.
The name must be 1 to 256 characters long and can contain only letters, digits, and underscores (_).
Catalog Type
DEFAULT
The catalog type. Available options:
- DEFAULT: The default data catalog, which manages data assets stored in OBS.
- CLICKHOUSE: An external catalog used to connect to a ClickHouse database.
Select Location
obs://aura-serverless/catalog1
The storage location of the catalog data in the OBS bucket. This parameter is optional.
Select PFS or OBJECT as required, select a location, and click OK.
- The location you specify must start with obs:// and must include a storage object. For example, select obs://aura-serverless/catalog1. If no OBS bucket is available, go to the OBS console and create one.
- To prevent data conflicts, this path cannot be a catalog storage directory currently used by other LakeFormation instances.
- It is recommended to select a path that is not used by other catalogs.
Description
Configure as required.
A brief description of the catalog to create.
The description can be up to 4,000 bytes long. Note that one Chinese character occupies three bytes.
- After creating the catalog, verify its details on the Catalog page.
- Create a database.
- Click the name of the catalog where you want to create the database. On the Database tab, you can view the databases already contained in this catalog.
If the database default already exists, skip the database creation.
- On the Database tab, click Create, set the required parameters, and click Submit.
Before using the new catalog, manually create the default database and specify a valid OBS path to prevent configuration risks caused by automatic system creation.
Parameter
Example Value
Description
Database Name
database1
The name of the database to create.
The name must be 1 to 128 characters long and can contain only letters, digits, hyphens (-), and underscores (_).
Catalog
lakeformation_for_auratest
The catalog to which the new database belongs.
In this example, select the catalog created in 4.
Select Location
obs://aura-serverless/catalog1/database1
The location in the OBS parallel file system where database data is stored.
Select PFS as required, select a location, and click OK.
- The location you specify must start with obs:// and must include a storage object. For example, select obs://aura-serverless/catalog1/database1. If no OBS bucket is available, go to the OBS console and create one.
- This path must differ from the storage path of the associated catalog (the Select Location parameter value configured during catalog creation).
- To prevent data conflicts, this path cannot be a catalog storage path currently used by other LakeFormation instances.
- If Database Storage Locations is set for the catalog that the database belongs to, set this parameter to a subpath of Database Storage Locations or the Select Location value of the catalog.
Description
Configure as required.
A brief description of the database to create.
The description can be up to 4,000 bytes long. Note that one Chinese character occupies three bytes.
- After creating the database, verify its details on the Database page.
- Click the name of the catalog where you want to create the database. On the Database tab, you can view the databases already contained in this catalog.
Step 3: Create a Workspace
- Log in to the AI DataLake console.
- In the left navigation pane, click the workspace area.
- Select Create Workspace from the drop-down list.
- Set the following workspace parameters.
Table 1 Parameters for creating a workspace Category
Parameter
Example Value
Description
Basic Information
Workspace Name
workspace_auratest
The name of the workspace.
- The name can contain only letters, digits, hyphens (-), and underscores (_).
- The name must be 4 to 32 characters long.
The workspace name is case-insensitive. Uppercase letters are automatically converted to lowercase.
Description
Smart driving data analytics
A brief description of the workspace.
Enterprise Project
default
If the workspace you are creating belongs to an enterprise project, select that enterprise project. EPS provides enterprise projects that group cloud resources by project to manage resources and users within specific projects.
For details about how to configure enterprise projects, see Enterprise Management User Guide.
NOTE:This parameter appears only for users with the EPS service enabled.
Multimodal Data Management
LakeFormation Instance
lakeformation_for_auratest
Select the LakeFormation instance associated with the current workspace. Specifically, select the instance created in Step 2: Plan and Create a LakeFormation Instance, Catalog, and Database.
Each workspace must be associated with one LakeFormation instance. You cannot change this instance after the workspace is created.
- Verify that all configurations are correct.
Click Create Now to create the workspace.
After the workspace is created, you can view it in the workspace management list.
Step 4: Create a Compute Resource Pool
- On the AI DataLake console, use the drop-down menu in the upper left corner to switch to the workspace created in Step 3: Create a Workspace.
- In the left navigation pane, choose Resource Management > Compute Resource Pools, and then click Buy in the upper right corner to open the purchase page.
- On the Buy Compute Resource Pool page, set the parameters. For details about the parameters, see Table 2.
Table 2 Parameters for purchasing a compute resource pool Parameter
Example Value
Description
Billing Mode
Pay-per-use
- Yearly/Monthly: A prepaid billing mode where you pay in advance for a specified duration. Resources are dedicated to your account during the subscription period and remain allocated even when no jobs are running (idle). This mode ensures optimal user experience and is more cost-effective than pay-per-use billing for long-term workloads.
This cost-effective mode is ideal for predictable workloads, such as stable production environments that have completed development.
- Pay-per-use: You are billed based on the actual runtime (billed by the second and settled hourly). Resources are dedicated to your account. You can use or release them at any time.
Resource Pool Name
resource_pool_for_auratest
The name of the compute resource pool.
- The name can contain only lowercase letters, digits, and hyphens (-), and must start with a letter and end with a letter or digit.
- The name can contain a maximum of 63 characters.
CPU Resources
In this example, eight general-computing standard instances are configured.
After selecting CPU Resources, specify the resource specifications and configure the number of instances to purchase.
CPUs are general-purpose compute resources suitable for a variety of tasks.
- CPU resources are versatile and suitable for various computing tasks. CPUs are more cost-effective than GPUs or NPUs and excel at processing sequential tasks.
- CPU resources are suitable for ETL (extract, transform, and load) workflows, lightweight computing scenarios (such as small-scale data processing and script execution), and log analysis scenarios (such as log collection, parsing, and statistical analysis).
- For details about CPU specifications, see Product Specifications.
GPU Resources
In this example, no GPU instances are purchased.
After selecting GPU Resources, specify the resource specifications and configure the number of instances to purchase.
GPUs are suitable for graphics rendering and large-scale parallel computing, and are ideal for deep learning training and scientific computing. GPUs have hundreds or thousands of computing cores and can process a large number of simple tasks simultaneously.
- GPU resources support parallel computing and are suitable for batch processing jobs. Thousands of cores can execute tasks simultaneously, resulting in high processing efficiency. GPUs are ideal for deep learning, neural networks, and AI workloads.
- GPU resources are suitable for deep learning (such as neural network training and model optimization), image processing (such as image recognition and object detection), video processing (such as video analysis, transcoding, and rendering), and other scientific computing workloads.
- For details about GPU specifications, see Product Specifications.
NPU Resources
In this example, no NPU resources are purchased.
After selecting NPU Resources, specify the resource specifications and configure the number of instances to purchase.
NPUs are suitable for AI workloads. NPU resources use an optimized architecture and instruction set to accelerate AI inference tasks, delivering high energy efficiency.
- NPU resources are dedicated to AI workloads and feature high performance, low latency, and low inference costs.
- NPU resources are suitable for AI workloads, image recognition, and recommendation systems.
- For details about NPU specifications, see Product Specifications.
AI DataLake Network
Configure as required.
Select the network to which the AI DataLake resource pool belongs. The network is built on a VPC. If no network is available, click Create Network to create one.
Each workspace supports only one network.
- Yearly/Monthly: A prepaid billing mode where you pay in advance for a specified duration. Resources are dedicated to your account during the subscription period and remain allocated even when no jobs are running (idle). This mode ensures optimal user experience and is more cost-effective than pay-per-use billing for long-term workloads.
- After configuring the parameters, click Buy Now and confirm the settings on the displayed page.
- Click Submit. Wait until the resource pool status changes to Available, indicating that the resource pool has been successfully created.
Step 5: Create an AuraJobV2 Endpoint for Running Jobs
- On the AI DataLake console, use the drop-down menu in the upper left corner to switch to the target workspace.
- In the left navigation pane, choose Engine Endpoints > Aura. The Aura engine endpoint list appears.
- Click Create Endpoint in the upper right corner of the page and configure the parameters. Table 3 describes the key parameters. You can keep the default values for all other parameters.
Table 3 Parameter description Parameter
Example Value
Description
Endpoint Type
AuraJob
AuraJob is selected by default and cannot be modified.
Endpoint Version
v2.0
Select an endpoint version. For multimodal data processing using Aura DataFrame, select v2.0.
Endpoint Name
aura-endpoint-test001
Enter an endpoint name. It is a unique endpoint identifier. This name cannot match an existing endpoint and cannot be changed after creation.
- The name can contain only lowercase letters, digits, and hyphens (-), and must start with a letter and end with a letter or digit.
- The name can contain a maximum of 63 characters.
Endpoint Display Name
Dedicated Aura endpoint for the intelligent driving team-02
Enter an endpoint display name. This name can be changed after creation and appears on the console to help users identify the endpoint.
- The name can contain only letters, digits, and hyphens (-).
- The name can contain a maximum of 63 characters.
Resource Allocation
Hybrid
Select a resource allocation mode.
- Reserved: Provides exclusive performance and optimal cost-effectiveness, ensuring stable baseline performance.
- Hybrid: Provides baseline stability and automatic scaling. Reserved resources are used first, and auto scaling is triggered automatically during peak hours.
This mode is best for workloads with predictable fluctuations.
Compute Resource Pool
resource_pool_for_auratest
Select the resource pool created in Step 4: Create a Compute Resource Pool from the drop-down list.
Worker Group Settings
-
Configure the worker group resources for the AuraJobV2 endpoint.
- Resource Flavor: In this example, select the required CPU resource flavor from the drop-down list.
- Resource Allocation per Worker: Select the vCPU count and memory size for each worker from the drop-down list.
- Worker Range (Min–Max): This parameter specifies the minimum and maximum number of workers in each worker group.
The minimum number of workers must be greater than 0, and less than or equal to the maximum number of workers.
- Image: In this example, select a built-in image. Hover over the Image column and click
. On the Built-in Images tab, click an image name, select an image version, and then click OK.
Result Set Storage
obs-aura
Select an OBS parallel file system to store the result cache and log files generated during job execution. The OBS parallel file system cannot be changed after the endpoint is created.
If no OBS parallel file system is available, click Create OBS parallel file system to create one. For details, see Creating a Parallel File System.
NOTE:Result set storage is used to store result files generated during job execution. You can manually clear these files periodically based on your retention requirements, or configure a lifecycle rule in the OBS parallel file system to manage their storage duration automatically. For details, see Creating a Lifecycle Rule.
Ephemeral Storage
storage-t1sa
Select the storage resource used to cache the Aura engine runtime program. You cannot change this storage resource after creating the endpoint.
When a compute task accesses or generates a large volume of data that exceeds the capacity of the local compute node storage or the shared storage system, additional storage resources outside the compute resource group are required.
You can configure external storage resources to store job data for the Aura endpoint.
Select a storage resource from the drop-down list. If no storage resource is available, click Buy storage resource to buy one. For details, see Purchasing Storage Resources.
- Click Create Now. When the endpoint status changes to Running, the endpoint is created.
Step 6: Connect to the AuraJobV2 Endpoint
- On the AI DataLake console, click DataArts Studio in the lower left corner of the navigation pane to open the DataArts Studio job development page.
- Create a runtime environment.
- Choose Data Development > Develop Job. In the lower right corner of the page, click Runtime Environment Unavailable. In the window that appears, click Create Environment, set the following parameters, and click Create to create a notebook.
- Runtime Environment Name: Enter a custom name.
- Resource Group: Select the notebook resource group that you created.
- Runtime Resource Specifications: Select the required resource specifications for the runtime environment.
- Image: Select the target notebook image.
- In the upper right corner of the page, hover over Disconnected. In the pop-up box, click Select Runtime Environment and select the notebook you created.
- Choose Data Development > Develop Job. In the lower right corner of the page, click Runtime Environment Unavailable. In the window that appears, click Create Environment, set the following parameters, and click Create to create a notebook.
- In the Notebook Environment Directory area, right-click My Files and select New Notebook. Specify the notebook name, select the target storage directory, and click OK.
- Bind compute resources.
- In the upper right corner of the page, click Python. In the pop-up box, click Bind Compute Resource, set the parameters, and click OK.
Table 4 Parameters for binding an AuraJobV2 endpoint Parameter
Example Value
Description
Resource Type
Fabric SQL
Select the compute engine for notebook job development. In this example, select Fabric SQL.
Resource Name
aura_sql_966da08a
Enter the compute resource name.
Workspace
workspace_auratest
Select the workspace to which the selected AuraJobV2 endpoint belongs.
Endpoint
aura-endpoint-test001
Select the AuraJobV2 endpoint name.
- In the upper right corner of the page, click Python. In the pop-up box, click the name of the created compute resource.
- In the upper right corner of the page, click Python. In the pop-up box, click Bind Compute Resource, set the parameters, and click OK.
- In the notebook cell, enter the following magic command to connect to the AuraJobV2 endpoint for executing the job:
con = %aura_frame --lf_catalog_name xxx --obs_bucket_name xxx --obs_directory_base xxx/test --default_database xxx
Table 5 Parameter description Parameter
Description
lf_catalog_name
The name of the LakeFormation catalog to connect to.
obs_bucket_name
The name of the OBS parallel file system used to store UDFs.
obs_directory_base
The path of the OBS parallel file system used to store UDFs.
default_database
The name of the default LakeFormation database to connect to.
Click
in the upper left corner to run the command. If the following information appears, the AuraJobV2 endpoint is connected successfully:[INFO] [Aura Frame] 2026-09-30 11:21:36 Setting guc options: 'SET timezone = UTC; SET obs_result_format = 2;SET current_schema = database****;' [INFO] [Aura Frame] 2026-09-30 11:21:36 Created session 01a0f054-f093-7059-8f71-bf173d08**** successfully.
Step 7: Import the Python and Aura DataFrame SDK Dependency Packages
- In the upper left corner of the page, click New Cell.
- In the notebook cell, enter the following command and click
in the upper left corner to run it: import sys import requests import pandas as pd import aura_frame as aura from aura_frame.multimodal.types import image, embedding from aura_frame.ibis.backends.sql.datatype import advance_dtype
Step 8: Create a Data Table
- In the upper left corner of the page, click New Cell.
- In the notebook cell, run the following commands to create a data table:
import ibis target_database = "xxx" table_name = "t1" table_schema = ibis.schema({"a": "int32", "b": "int32", "c": "int32"}) con.sql(f'DROP TABLE IF EXISTS "{target_database}"."{table_name}";') con.create_table( table_name, schema=table_schema, database=target_database, table_format="orc", if_not_exists=True, ) con.sql(f''' INSERT INTO "{target_database}"."{table_name}" (a, b, c) VALUES (1,3,1) ''') ds = con.load_dataset("t1", database=target_database) - Click
in the upper left corner to run the command. If information similar to the following appears, the table is created:[INFO] [Aura Frame] 2026-10-16 11:56:49 Creating table database1.t1 [INFO] [Aura Frame] 2026-10-16 11:56:49 CREATE TABLE IF NOT EXISTS "database1"."t1" ("a" INT, "b" INT, "c" INT) STORE AS orc [INFO] [Aura Frame] 2026-10-16 11:56:58 Loading dataset database1.t1
Step 9: Define and Register a UDF
- In the upper left corner of the page, click New Cell.
- In a notebook cell, enter the following commands to define and register the UDF:
target_database = "xxx" #Replace this with the name of the database used to manage registered UDFs in LakeFormation. import ibis.expr.datatypes as dt import aura_frame as aura func_signature = aura.Signature( parameters=[ aura.Parameter(name="start", annotation=int), aura.Parameter(name="endnum", annotation=int), aura.Parameter(name="step", annotation=int) ], return_annotation=dt.Struct({"col1": int}), ) def py_generate_series(start, endnum, step): current = start while current <= endnum: yield {'col1': current} current += step # If no UDF is registered, you do not need to perform the deletion. con.delete_function("py_generate_series", database=target_database, if_it_exists=True) con.create_table_function( py_generate_series, database=target_database, signature=func_signature ) - Click
in the upper left corner to run the command. If information similar to the following appears, the UDF is defined and registered:[INFO] [Aura Frame] 2026-09-30 11:28:38 Deleting user-defined function database1.py_generate_series if exists [INFO] [Aura Frame] 2026-09-30 11:28:42 Start to register function database1.py_generate_series [INFO] [Aura Frame] 2026-09-30 11:28:42 Function main entry code has been serialized by cloudpickle. [INFO] [Aura Frame] 2026-09-30 11:28:42 The Python package dependencies have been resolved. [INFO] [Aura Frame] 2026-09-30 11:28:42 Appending /opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/types(4.0 KB) to archive zipfile as aura_frame/multimodal/types [INFO] [Aura Frame] 2026-09-30 11:28:42 Appending /opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/types/__init__.py(0 bytes) to archive zipfile as aura_frame/multimodal/types/__init__.py [INFO] [Aura Frame] 2026-09-30 11:28:42 Appending /opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/types/audio.py(8.93 KB) to archive zipfile as aura_frame/multimodal/types/audio.py [INFO] [Aura Frame] 2026-09-30 11:28:42 Appending /opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/types/embedding.py(798 bytes) to archive zipfile as aura_frame/multimodal/types/embedding.py [INFO] [Aura Frame] 2026-09-30 11:28:42 Appending /opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/types/image.py(5.83 KB) to archive zipfile as aura_frame/multimodal/types/image.py [INFO] [Aura Frame] 2026-09-30 11:28:42 Appending /opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/types/vectorized.py(508 bytes) to archive zipfile as aura_frame/multimodal/types/vectorized.py [INFO] [Aura Frame] 2026-09-30 11:28:42 Appending /opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/types/video.py(10.83 KB) to archive zipfile as aura_frame/multimodal/types/video.py [INFO] [Aura Frame] 2026-09-30 11:28:42 Appending /opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/utils.py(1.84 KB) to archive zipfile as aura_frame/multimodal/utils.py [INFO] [Aura Frame] 2026-09-30 11:28:42 Function py_generate_series's archive zipfile has been uploaded to OBS. [INFO] [Aura Frame] 2026-09-30 11:28:42 SQL statement for registering function is CREATE FUNCTION database1.py_generate_series(start BIGINT, endnum BIGINT, step BIGINT) RETURNS SETOF STRUCT<"col1":BIGINT> LANGUAGE PYTHON RUNTIME_VERSION = '3.10' STRICT VOLATILE IMPORTS = ('https://***.obs.cn-north-7.ulanqab.huawei.com/aura-serverless/catalog1/py_generate_series/py_generate_series_20260930112842.zip') HANDLER = 'py_generate_series' AS $$ # Comment for UDF 'py_generate_series' # === Function Metadata === # UDTFMeta( # _runtime_version='3.10', # _runtime_env=RuntimeEnv({}), # _registered=False, # _input_type=<InputType.PYTHON: 4>, # _replace=False, # _temporary=False, # _if_not_exists=False, # _strict=True, # _volatility=<VolatilityType.VOLATILE: 3>, # _imports=('/opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/types', '/opt/cloud/3rdComponent/python/lib/python3.10/site-packages/aura_frame/multimodal/utils.py'), # _packages=(), # _register_type=None, # _comment=None, # _work_group_name=None, # _database='database1', # _func_name='py_generate_series', # _signature=<Signature (start: int, endnum: int, step: int) -> struct<col1: int64>>, # _udf=<function py_generate_series at 0x7fa718614e50>, # _module='__main__', # ) # === Function Source Code === # def py_generate_series(start, endnum, step): # current = start # while current <= endnum: # yield {'col1': current} # current += step import cloudpickle py_generate_series = cloudpickle.loads(bytes.fromhex("8005952e020000000000008c17636c6f75647069636b6c652e636c6f75647069636b6c65948c0e5f6d616b655f66756e6374696f6e9493942868008c0d5f6275696c74696e5f747970659493948c08436f6465547970659485945294284b034b004b004b044b024b63433081007c007d037c037c016b01721664017c036901560001007c037c0237007d037c037c016b0173076400530064005300944e8c04636f6c3194869429288c057374617274948c06656e646e756d948c0473746570948c0763757272656e749474948c212f746d702f6970796b65726e656c5f313735392f343139353131343239382e7079948c1270795f67656e65726174655f736572696573944b0c430c0280040108010a01080110fe942929749452947d94288c0b5f5f7061636b6167655f5f944e8c085f5f6e616d655f5f948c085f5f6d61696e5f5f94754e4e4e7494529468008c125f66756e6374696f6e5f7365747374617465949394681a7d947d942868178c1270795f67656e65726174655f736572696573948c0c5f5f7175616c6e616d655f5f948c1270795f67656e65726174655f736572696573948c0f5f5f616e6e6f746174696f6e735f5f947d948c0e5f5f6b7764656661756c74735f5f944e8c0c5f5f64656661756c74735f5f944e8c0a5f5f6d6f64756c655f5f9468188c075f5f646f635f5f944e8c0b5f5f636c6f737572655f5f944e8c175f636c6f75647069636b6c655f7375626d6f64756c6573945d948c0b5f5f676c6f62616c735f5f947d947****")) $$ COMMENT '{"description": null, "pretty_name": "py_generate_series"}' [INFO] [Aura Frame] 2026-09-30 11:28:45 User-defined function database1.py_generate_series registered successfully. <function __main__.py_generate_series(start, endnum, step)>
Step 10: Use the UDF to Write Data to a Data Table
- In the upper left corner of the page, click New Cell.
- In a notebook cell, run the following commands to use the UDF to write data to the data table:
udtf_handler = con.get_function("py_generate_series", database=target_database) ds = ds.flat_map( fn=udtf_handler, on=[ds.a, ds.b, ds.c], as_col='new_col' ) ds.show() - Click
in the upper left corner to run the command. If information similar to the following appears, the data is written to the table:[INFO] [Aura Frame] 2026-09-30 11:37:01 SQL statement for executing: SELECT "t2"."a", "t2"."b", "t2"."c", "t2"."new_col" FROM (SELECT "t1"."a", "t1"."b", "t1"."c", "t1"."udtf_tmp_col", ("t1"."udtf_tmp_col")."col1" AS "new_col" FROM (SELECT "t0"."a", "t0"."b", "t0"."c", xxx.PY_GENERATE_SERIES("t0"."a", "t0"."b", "t0"."c") WITH ARGUMENTS(cpu = 0.5, memory = 1024, arch = 'x86') AS "udtf_tmp_col" FROM "xxx"."t1" AS "t0") AS "t1") AS "t2" LIMIT 10 [INFO] [Aura Frame] 2026-09-30 09:27:05 Running SQL statement, id is 019dd6d8-be56-71e9-9196-d7f7e04a4c8f a b c new_col 0 1 3 1 1 1 1 3 1 2 2 1 3 1 3
Step 11: Close the Database Connection
After completing the required data operations, you must close the database connection.
- In the upper left corner of the page, click New Cell.
- In a notebook cell, enter the following command and click
in the upper left corner to close the database connection: con.close()
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