Installs a package in a MaxCompute project.

Limits

Before you use a package, take note of the following limits:
  • A maximum of 1,000 resources can be added to a package.
  • A package can be installed for a maximum of 100,000 MaxCompute projects.
  • A maximum of 100 packages in a MaxCompute project can be installed for another MaxCompute project.
  • A maximum of 100,000 packages can be created for a MaxCompute project.
  • A maximum of 100,000 packages can be installed for a MaxCompute project.

Syntax

install package <project_name>.<package_name>;

Usage notes

After you install packages, you can execute the show packages; statement to view the packages that are installed, and execute the describe package <package_name>; statement to view the resources and permissions in a package.

Parameters

Parameter Required Description
project_name Yes The name of the MaxCompute project in which you want to install a package.

Log on to the MaxCompute console. In the top navigation bar, select a region. On the Project management tab, obtain the name of the MaxCompute project.

package_name Yes The name of the package that you want to install.

You can execute the show packages; statement on the MaxCompute client to obtain the information about the package that you created.

Examples

Install the datashare package of the test_project_a project in the test_project_b project. In this example, the Alibaba Cloud account Amy@aliyun.com is the owner of the test_project_b project. Sample statements:
-- Go to the test_project_b project by using the Alibaba Cloud account Amy@aliyun.com. 
use test_project_b; 
-- Install the package. 
install package test_project_a.datashare;

Related statements

  • CREATE PACKAGE: Creates a package.
  • ADD TO PACKAGE: Adds the resources that are required by package users to the package that is created.
  • REMOVE FROM PACKAGE: Removes resources from the package that is created.
  • ALLOW PROJECT: A package creator in a project authorizes other projects to use the package that is created.
  • DISALLOW PROJECT: A package creator revokes access permissions on a package from a project.
  • DESCRIBE PACKAGE: Views the details of a package that is created in a MaxCompute project.
  • DROP PACKAGE: Deletes a package.
  • UNINSTALL PACKAGE: Uninstalls a package that is installed from a MaxCompute project.
  • GRANT: Authorizes a user or role to access a package.
  • REVOKE: Revokes access permissions on a package from a user or role.
  • SHOW: Views the packages that are created or installed in a MaxCompute project.