All Products
Search
Document Center

MaxCompute:Delete a table or a MaxCompute project

Last Updated:Jun 16, 2026

Delete data tables or MaxCompute projects that you no longer need to avoid unnecessary resource consumption and billing charges.

Delete a table

  • Run the drop table command to remove sample data while keeping your MaxCompute project.

  • If you retain the sample data, storage fees apply to your account. For billing rules, see Storage fees (pay-as-you-go).

  1. In the MaxCompute client, run the following command to delete a table from your project.

    DROP TABLE <table_name>;
  2. After deleting the table, run the following command to verify the deletion.

    SHOW tables;

    If the deleted table does not appear in the output, the table has been successfully deleted.

  3. If you accidentally delete a table, you can recover it only if backup and restore is enabled for the project and the deletion occurred within the backup retention period configured for the project. For more information, see Local backup.

Delete a MaxCompute project

  • If you no longer need the sample project, follow these steps to delete it. Deleting a project also removes all tables in the project.

  • If you are unsure whether the data is still needed, you can first stop the service and monitor whether other business operations are affected. If no impact is observed, you can permanently delete the project; otherwise, you can manually restore it. For the restore procedure, see Project Management.

MaxCompute does not support deleting a project by running a command in the client. You must delete it in the MaxCompute console as follows.

Important

Deleting a project has the following consequences:

  • All tables and their data in the project are immediately and permanently deleted with no possibility of recovery.

  • All tasks submitted to this project fail because the project no longer exists.

  • If the MaxCompute project is attached to a DataWorks workspace, deleting the project renders the DataWorks workspace unusable and unrecoverable. Before deleting the project, go to DataWorks and detach it first.

  1. Authorization

    1. An Alibaba Cloud account or a RAM user with the Super_Administrator role can log on to the MaxCompute console and delete the MaxCompute project directly.

    2. Standard RAM users require prior authorization:

      1. Log in to the RAM console.

      2. In the left navigation bar, select Manage Permissions > Policies.

      3. On the Create Policy page, select JSON Editor. Enter the following policy:

        {
          "Version": "1",
          "Statement": [
            {
              "Effect": "Allow",
              "Action":"odps:DeleteProject",
              "Resource": "*"
            }
          ]
        }

        Click OK. In the Create Policy dialog box, enter a custom Policy Name. You can also add a description and tags.

        You can name the custom Policy Name MaxCompute-DeleteProject.

      4. On the Authorize page, click Create Authorization.

        In the Create Authorization dialog box, select Principal and Policies.

        1. For Principal, select the RAM user to authorize.

        2. For Policies, select the policy you created. In this example, the policy name is MaxCompute-DeleteProject.

        Click OK.

  2. Delete a project in the MaxCompute console

    1. Log in to the MaxCompute console and select a region in the upper-left corner.

    2. On the Projects page, click Delete in the Actions column for the target project.

    3. In the Delete Project dialog box, select the Are you sure that you want to delete the MaxCompute project? checkbox and click OK to delete the MaxCompute project.

    4. MaxCompute projects are Immediately Delete and Prohibit Project Restoration.

What to do next

You have completed the Quick Start tutorial for the MaxCompute client. To learn more about using MaxCompute, see Next steps.