All Products
Search
Document Center

MaxCompute:ALLOW PROJECT

Last Updated:Mar 26, 2026

Grants a project permission to install a package.

Run this statement from the project that owns the package (the resource provider project).

Syntax

allow project <project_name> to install package <package_name> [using label <number>];

Parameters

ParameterRequiredDescription
project_nameYesName of the MaxCompute project to authorize. To find the project name, open the MaxCompute console and go to the Project management tab.
package_nameYesName of the package to share. To list packages in the current project, run show packages; on the MaxCompute client.
numberNoSensitivity level for label-based access control. The authorized project can only access package data whose sensitivity level is less than or equal to number. Defaults to 0 if not specified.

Example

The following example is run in the test_project_a project. It grants test_project_b permission to install the datashare package.

-- Grant test_project_b permission to install the datashare package.
allow project test_project_b to install package datashare;

After the statement runs successfully, test_project_b can install the package using INSTALL PACKAGE.

Package management workflow

ALLOW PROJECT is the authorization step in the package sharing workflow:

StepStatementDescription
1. CreateCREATE PACKAGECreate a package in the resource provider project.
2. Add resourcesADD TO PACKAGEAdd the resources to share.
3. AuthorizeALLOW PROJECT (this page)Grant a project permission to install the package.
4. InstallINSTALL PACKAGEInstall the package in the authorized project.

Related statements

StatementDescription
CREATE PACKAGECreate a package.
DISALLOW PROJECTRevoke a project's permission to install a package.
DESCRIBE PACKAGEView the details of a package.
REMOVE FROM PACKAGERemove resources from a package.
DROP PACKAGEDelete a package.
UNINSTALL PACKAGEUninstall a package from a project.
GRANTGrant a user or role access to an installed package.
REVOKERevoke a user or role's access to a package.
SHOWList packages created or installed in a project.