您可以将现有 Google Cloud 项目与 Dataproc Metastore 搭配使用,也可以创建一个新项目。在这两种情况下,您都需要启用结算功能和 Dataproc Metastore API。
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-27。"],[[["\u003cp\u003eThis page outlines the process for enabling and disabling the Dataproc Metastore API in a Google Cloud project.\u003c/p\u003e\n"],["\u003cp\u003eEnabling the Dataproc Metastore API requires billing to be enabled on the project, as well as the API itself.\u003c/p\u003e\n"],["\u003cp\u003eDisabling the Dataproc Metastore API requires the deletion of all metastore services and any associated Cloud Storage buckets beforehand.\u003c/p\u003e\n"],["\u003cp\u003eTo enable or disable the API, you must have the Service Usage Administrator role, which grants the \u003ccode\u003eserviceusage.services.disable\u003c/code\u003e and \u003ccode\u003eserviceusage.services.enable\u003c/code\u003e permissions, or the equivalent permissions with a custom role.\u003c/p\u003e\n"]]],[],null,["# Enable and disable Dataproc Metastore\n\nThis page explains how to enable or disable Dataproc Metastore\nfor your Google Cloud project. For more information about the Service Usage API,\nsee [Enabling and disabling services](/service-usage/docs/enable-disable).\n\nBefore you begin\n----------------\n\n- [Understand How Dataproc Metastore works](/dataproc-metastore/docs/overview).\n\n### Required Roles\n\n\nTo get the permissions that\nyou need to enable and disable the Dataproc Metastore API,\n\nask your administrator to grant you the\n\n\n[Service Usage Administrator](/iam/docs/roles-permissions/serviceusage#serviceusage.serviceUsageAdmin) (`roles/serviceusage.serviceUsageAdmin`)\nIAM role on your project.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nThis predefined role contains\n\nthe permissions required to enable and disable the Dataproc Metastore API. To see the exact permissions that are\nrequired, expand the **Required permissions** section:\n\n\n#### Required permissions\n\nThe following permissions are required to enable and disable the Dataproc Metastore API:\n\n- ` serviceusage.services.disable `\n- ` serviceusage.services.enable`\n\n\nYou might also be able to get\nthese permissions\nwith [custom roles](/iam/docs/creating-custom-roles) or\nother [predefined roles](/iam/docs/roles-overview#predefined).\nFor more information about specific Dataproc Metastore roles and permissions, see [Dataproc Metastore IAM overview](/dataproc-metastore/docs/iam-and-access-control).\n\n\u003cbr /\u003e\n\nEnable Dataproc Metastore\n-------------------------\n\nYou can use an existing Google Cloud project with Dataproc Metastore\nor create a new one. In both cases, you need to enable billing and the\nDataproc Metastore API.\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Dataproc Metastore API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=metastore.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Dataproc Metastore API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=metastore.googleapis.com)\n\n\u003cbr /\u003e\n\nDisable Dataproc Metastore\n--------------------------\n\nBefore you disable the Dataproc Metastore API, make sure you\n[Delete all of your metastore services](/dataproc-metastore/docs/delete-service).\nYou can't disable the API while a service is running or still exists.\n| **Note:** To avoid charges, delete all Cloud Storage buckets for your services. You can delete your services before or after disabling the API.\n\nTo disable the Dataproc Metastore API, follow these steps:\n\n1. In the Google Cloud console, select the project that contains the Dataproc Metastore API.\n2. Go to the Dataproc Metastore [API overview page](https://console.cloud.google.com/apis/library/metastore.googleapis.com).\n3. Click **Manage**.\n4. Click **Disable API**.\n\nWhat's next\n-----------\n\n- [Quickstart for deploying Dataproc Metastore](/dataproc-metastore/docs/create-service-cluster)\n- [Create a service](/dataproc-metastore/docs/create-service)\n- [Service access](/dataproc-metastore/docs/access-service)"]]