gcloud metastore federations create Stay organized with collections Save and categorize content based on your preferences.
- 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 name
my-metastore-federationin locationus-centralwithtwo backendsdpms1anddpms2, 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 the
projectattribute:- provide the argument
federationon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
FEDERATION- ID of the federation or fully qualified identifier for the federation.
To set the
federationattribute:- provide the argument
federationon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- The location of the Dataproc Metastore service.
If not specified, will use
defaultmetastore/location.To set thelocationattribute:- provide the argument
federationon the command line with a fullyspecified name; - provide the argument
--locationon the command line; - set the property
metastore/location.
- provide the argument
- provide the argument
- 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.
- REQUIRED FLAGS
--backends=RANK=BACKEND- Backends from which the federation service serves metadata at query time. Thebackends are specified as a comma-separated list of
RANK=BACKENDpairs. For example:1=dpms:dpms1,2=dpms:projects/my-project/locations/us-central1/services/dpms2.RANKrepresents the rank of the backend metastore and is used toresolve database name collisions.BACKENDis specified asMETASTORE_TYPE:METASTORE_NAMEwhereMETASTORE_TYPEisthe type of backend metastore andMETASTORE_NAMEis 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_VERSIONmust 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 helpfor details. - API REFERENCE
- This command uses the
metastore/v1API. The full documentation forthis API can be found at:https://cloud.google.com/dataproc-metastore/docs - NOTES
- These variants are also available:
gcloudalphametastorefederationscreategcloudbetametastorefederationscreate
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.