As an alternative to using the [Dataproc Metastore APIs](https://docs.cloud.google.com/dataproc-metastore/docs/reference/rest),
you can manage and access Dataproc Metastore services
using [Google Cloud CLI](https://docs.cloud.google.com/sdk) `gcloud metastore` commands.

This page explains how to get started using the Google Cloud CLI, so you can use it
to interact with Dataproc Metastore.

## Before you begin

<br />

## Get started with the Google Cloud CLI

To start with the gcloud CLI, review the
[Google Cloud CLI Documentation](https://docs.cloud.google.com/sdk/docs).
You can get help for the tool, resources, and commands by using the `--help`
flag:

    gcloud metastore --help

The [Google Cloud CLI reference](https://docs.cloud.google.com/sdk/gcloud/reference) also provides the information
shown by the `--help` flag.

## Set default configuration properties in your local client

Most `gcloud metastore` commands require a location, which you specify 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, run the following command:

   ```
   gcloud config set project PROJECT_ID
   ```

   where <var translate="no">PROJECT_ID</var> is the ID of the Google Cloud project that the
   Dataproc Metastore service belongs to.
2. To configure the Dataproc Metastore location, run the following command:

   ```
   gcloud config set metastore/location LOCATION
   ```

   where <var translate="no">LOCATION</var> is a supported region such as `us-central1`.
3. To configure the Dataproc Metastore tier, run the following command:

   ```
   gcloud config set metastore/tier TIER
   ```

   where <var translate="no">TIER</var> sets the capacity of the new service.
4. Optional: To list the configuration for the gcloud CLI, run the following command:

   ```
   gcloud config list
   ```

## What's next

- [Dataproc Metastore gcloud commands](https://docs.cloud.google.com/sdk/gcloud/reference/metastore)
- [Enabling the API](https://docs.cloud.google.com/dataproc-metastore/docs/enable-service)
- [Quickstart for deploying Dataproc Metastore](https://docs.cloud.google.com/dataproc-metastore/docs/create-service-cluster)