Creating a Function Using SQL
Description
Creates a Remote UDAF for use in Spark job development.
Syntax
1 | CREATE FUNCTION [db_name.]function_name AS class_name USING FUNCTIONGRAPH 'urn' |
or
1 | CREATE OR REPLACE FUNCTION [db_name.]function_name AS class_name USING FUNCTIONGRAPH 'urn' |
Requirements
None
Keywords
urn: On the FunctionGraph function list page, locate the function whose URN you want to copy and click Copy URN in the Operation column.
Example
Run the following command to create the UDAFDemo function:
CREATE FUNCTION UDAFDemo AS 'ExampleUDAFHandler' USING FUNCTIONGRAPH 'urn:fss:cn-north-7:330e068af1334c9782f4226acc00a2e2:function:default:test:latest'
Select the corresponding database and queue, enter the SQL statement, and click Execute.
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