LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

odps-func

Manage MaxCompute user-defined functions from odpscmd

TLDR

List functions in the current project
$ list functions;
copy
Describe a function
$ desc function [name];
copy
Create a function from an uploaded resource
$ create function [name] as '[package.ClassName]' using '[resource.jar]';
copy
Drop a function
$ drop function [name];
copy
Show built-in functions
$ show builtin functions;
copy

SYNOPSIS

Executed inside the odpscmd client as SQL-like statements:list functions [-p project];desc function name;create function name as 'class' using 'resources';drop function name;

DESCRIPTION

MaxCompute UDFs are managed through SQL-style statements issued from the odpscmd command-line client. The resource (jar, py file, archive) must be uploaded first with `add jar` / `add py` / `add archive` before a function can reference it.Function names are unique per project. Users need write permission on the project to create functions and delete permission to drop them.

PARAMETERS

list functions

List user-defined functions (alias: show functions).
desc function name
Show a function's owner, creation time, class, and resources.
create function name as 'class' using 'resources'
Register a new UDF. class is the fully-qualified Java class or Python module; resources is a comma-separated list of already-uploaded resources.
drop function name
Remove a UDF (requires delete permission).
show builtin functions [name]
List or describe MaxCompute built-in functions (client v0.43.0+).
-p project
Operate on a specific project (list functions only).

CAVEATS

Requires a configured odpscmd client with project access. UDFs registered via odpscmd or MaxCompute Studio are not automatically surfaced in DataWorks. For Python UDFs, ensure the Python runtime is supported by the project.

HISTORY

Part of the Alibaba Cloud MaxCompute (ODPS) CLI toolchain. UDF support has been a core MaxCompute feature since its first public release.

SEE ALSO

Copied to clipboard
Kai