LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

odpscmd-resource

manages MaxCompute (ODPS) project resources

TLDR

List all resources in the current project
$ odpscmd resource list
copy
Add a JAR resource
$ odpscmd resource add jar [file.jar]
copy
Add a Python resource
$ odpscmd resource add py [file.py]
copy
Add a file resource with a comment
$ odpscmd resource add file [data.csv] -c "[description]"
copy
Add an archive resource
$ odpscmd resource add archive [file.tar.gz]
copy
Describe a resource
$ odpscmd resource desc [resource_name]
copy
Delete a resource
$ odpscmd resource drop [resource_name]
copy

SYNOPSIS

odpscmd resource command [options]

DESCRIPTION

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.

PARAMETERS

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.

CAVEATS

Individual resource files have a size limit (typically 500 MB, but varies by configuration). Resource names must be unique within a project. The -f flag is needed to overwrite an existing resource. Part of the odpscmd CLI which requires a valid MaxCompute project configuration.

HISTORY

odpscmd resource is part of the MaxCompute Console (odpscmd), Alibaba Cloud's command-line tool for managing MaxCompute projects, originally known as ODPS (Open Data Processing Service).

SEE ALSO

Copied to clipboard
Kai