gcloud metastore federations create

NAME
gcloud metastore federations create - create a Dataproc Metastore federation
SYNOPSIS
gcloud metastore federations create(FEDERATION :--location=LOCATION)--backends=RANK=BACKEND[--async][--hive-metastore-version=HIVE_METASTORE_VERSION][--labels=[KEY=VALUE,…]][--tags=[KEY=VALUE,…]][GCLOUD_WIDE_FLAG]
DESCRIPTION
Create a new Dataproc Metastore federation with the given name andconfigurations.

If run asynchronously with--async, exits after printing oneoperation name that can be used to poll the status of the creation via:

gcloudmetastoreoperationsdescribe
EXAMPLES
To create a Dataproc Metastore federation with the namemy-metastore-federation in locationus-central withtwo backendsdpms1 anddpms2, run:
gcloudmetastorefederationscreatemy-metastore-federation--location=us-central1--backends=1=dpms:dpms1,2=dpms:projects/my-project/locations/us-central1/services/dpms2
POSITIONAL ARGUMENTS
Federation resource - Arguments and flags that specify the Dataproc Metastorefederation you want to create. The arguments in this group can be used tospecify the attributes of this resource. (NOTE) Some attributes are not givenarguments in this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentfederation on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

FEDERATION
ID of the federation or fully qualified identifier for the federation.

To set thefederation attribute:

  • provide the argumentfederation on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--location=LOCATION
The location of the Dataproc Metastore service.

If not specified, will usedefault metastore/location.To set thelocation attribute:

  • provide the argumentfederation on the command line with a fullyspecified name;
  • provide the argument--location on the command line;
  • set the propertymetastore/location.
REQUIRED FLAGS
--backends=RANK=BACKEND
Backends from which the federation service serves metadata at query time. Thebackends are specified as a comma-separated list ofRANK=BACKENDpairs. For example:1=dpms:dpms1,2=dpms:projects/my-project/locations/us-central1/services/dpms2.RANK represents the rank of the backend metastore and is used toresolve database name collisions.BACKEND is specified asMETASTORE_TYPE:METASTORE_NAME whereMETASTORE_TYPE isthe type of backend metastore andMETASTORE_NAME is the relativeresource name of the metastore. If only the name of the metastore is specified(e.g.dpms1), project and location will be inferred from theproject and location used to create the federation.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--hive-metastore-version=HIVE_METASTORE_VERSION
Hive metastore schema version of the Metastore federation.HIVE_METASTORE_VERSION must be one of:2.3.6,3.1.2.
--labels=[KEY=VALUE,…]
List of label KEY=VALUE pairs to add.

Keys must start with a lowercase character and contain only hyphens(-), underscores (_), lowercase characters, andnumbers. Values must contain only hyphens (-), underscores(_), lowercase characters, and numbers.

--tags=[KEY=VALUE,…]
List of tag KEY=VALUE pairs to add.
GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

API REFERENCE
This command uses themetastore/v1 API. The full documentation forthis API can be found at:https://cloud.google.com/dataproc-metastore/docs
NOTES
These variants are also available:
gcloudalphametastorefederationscreate
gcloudbetametastorefederationscreate

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-22 UTC.