Removes a resource from a package.

Syntax

remove <object_type> <object_name> from package <package_name>; 

Parameters

Parameter Required Description
object_type Yes The type of the object that you want to remove from the package. You can remove only one object at a time.

For more information about object types, see Permissions.

object_name Yes The name of the object that you want to remove from the package. Obtain the object name as follows:
  • Table or view name: You can execute the show tables; statement on the MaxCompute client to obtain the table or view name.
  • Resource file name: You can execute the list resources; statement on the MaxCompute client to obtain the resource file name.
  • Function name: You can execute the list functions; statement on the MaxCompute client to obtain the function name.
  • Instance name: You can execute the show instances; statement on the MaxCompute client to obtain the instance name.
package_name Yes The name of the package from which you want to remove a resource.

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

Examples

Remove the sale_detail table from the datashare package. Sample command:
-- Remove the sale_detail table from the datashare package. 
remove Table sale_detail from package 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.
  • 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.
  • INSTALL PACKAGE: Installs a package in a MaxCompute project.
  • UNINSTALL PACKAGE: Uninstalls a package that is installed from a MaxCompute project.
  • GRANT: Grants a user or role the permission 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.