Linux command
odpscmd-resource 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List all resources in the current project
odpscmd resource list
Add a JAR resource
odpscmd resource add jar [file.jar]
Add a Python resource
odpscmd resource add py [file.py]
Add a file resource with a comment
odpscmd resource add file [data.csv] -c "[description]"
Add an archive resource
odpscmd resource add archive [file.tar.gz]
Describe a resource
odpscmd resource desc [resource_name]
Delete a resource
odpscmd resource drop [resource_name]
说明
odpscmd resource manages resources within Alibaba Cloud MaxCompute (formerly ODPS) projects. Resources are files uploaded to a project that can be referenced by MapReduce jobs, UDFs (User-Defined Functions), and Graph jobs. Supported resource types include JAR files for Java-based UDFs and MapReduce programs, Python files for PyODPS UDFs, plain files for data, and archives (tar.gz, zip) for bundled dependencies. Table resources reference existing MaxCompute tables. Resources must be uploaded before they can be used in function definitions or job submissions. Each resource has a unique name within a project and can include an optional comment for documentation purposes.
参数
- list
- List all resources in the current project.
- add _TYPE_ _FILE_ -c _COMMENT_
- Upload a resource. TYPE is one of: jar, py, file, archive, table.
- drop _NAME_
- Delete a resource by name.
- desc _NAME_
- Show metadata and details of a resource.
- -c _COMMENT_
- Add a comment or description when uploading a resource.
- -f
- Force overwrite if a resource with the same name already exists.
- --help
- Display help information.
FAQ
What is the odpscmd-resource command used for?
odpscmd resource manages resources within Alibaba Cloud MaxCompute (formerly ODPS) projects. Resources are files uploaded to a project that can be referenced by MapReduce jobs, UDFs (User-Defined Functions), and Graph jobs. Supported resource types include JAR files for Java-based UDFs and MapReduce programs, Python files for PyODPS UDFs, plain files for data, and archives (tar.gz, zip) for bundled dependencies. Table resources reference existing MaxCompute tables. Resources must be uploaded before they can be used in function definitions or job submissions. Each resource has a unique name within a project and can include an optional comment for documentation purposes.
How do I run a basic odpscmd-resource example?
Run `odpscmd resource list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does list do in odpscmd-resource?
List all resources in the current project.