Using the Google Cloud SDK

This page describes how to get started using the Cloud SDK, so you can use it to manage Dataproc Metastore services.

In addition to using the Dataproc Metastore APIs, you can manage and access Dataproc Metastore services using Cloud SDK gcloud metastore commands.

The Cloud SDK provides the gcloud command-line tool to interact with Dataproc Metastore and other Google Cloud services.

Before you begin

  • The gcloud tool uses the API to access Dataproc Metastore, so you must enable the API before you can use the gcloud command-line tool to access Dataproc Metastore.
    Enable the Dataproc Metastore API
  • Install the Cloud SDK on your local client.
  • Run the following command to access gcloud metastore:
    gcloud components update

Getting started with the gcloud command-line tool

To start with the gcloud tool, review the Cloud SDK Documentation. You can get help for the tool, resources, and commands by using the --help flag:

gcloud metastore --help

The help displayed with the --help flag is also available in the Cloud SDK reference.

Setting default configuration properties in your local client

Most gcloud metastore commands require a location. You can specify the location by using the --location flag or by setting the default location. You can also set the default project and tier for your Dataproc Metastore services.

  1. To set the default project, enter the following command:
    gcloud config set project PROJECT_ID

    where PROJECT_ID is the ID of the Google Cloud project that the Dataproc Metastore service belongs to.

  2. To configure the Dataproc Metastore location, enter the following command:
    gcloud config set metastore/location LOCATION

    where LOCATION is a supported region such as us-central1.

  3. To configure the Dataproc Metastore tier, enter the following command:
    gcloud config set metastore/tier TIER

    where TIER sets the capacity of the new service.

  4. Optional: To list the configuration for the gcloud tool, enter the following command:
    gcloud config list

What's next