← 返回命令列表

Linux command

odps-func 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

List functions

list functions;

Describe a function

desc function [name];

Create a function

create function [name] as '[package.ClassName]' using '[resource.jar]';

Drop a function

drop function [name];

Show built-in functions

show builtin functions;

说明

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.

参数

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).

FAQ

What is the odps-func command used for?

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.

How do I run a basic odps-func example?

Run `list functions;` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list functions do in odps-func?

List user-defined functions (alias: show functions).