gcloud metastore services query-metadata

NAME
gcloud metastore services query-metadata - execute a SQL query against a Dataproc Metastore Service's metadata
SYNOPSIS
gcloud metastore services query-metadata(SERVICE :--location=LOCATION)--query=QUERY[--format=FORMAT][GCLOUD_WIDE_FLAG]
DESCRIPTION
Execute a SQL query against a Dataproc Metastore Service's metadata.
EXAMPLES
To query metadata against a Dataproc Metastore service with the namemy-metastore-service in locationus-central1, and thesql query "show tables;", run:
gcloudmetastoreservicesquery-metadatamy-metastore-service--location=us-central1--query="show tables;"
POSITIONAL ARGUMENTS
Service resource - The service to query metadata. The arguments in this groupcan be used to specify the attributes of this resource. (NOTE) Some attributesare not given arguments in this group but can be set in other ways.

To set theproject attribute:

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

This must be specified.

SERVICE
ID of the service or fully qualified identifier for the service.

To set theservice attribute:

  • provide the argumentservice on the command line.

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

--location=LOCATION
Location to which the service belongs.

To set thelocation attribute:

  • provide the argumentservice on the command line with a fullyspecified name;
  • provide the argument--location on the command line;
  • set the propertymetastore/location.
REQUIRED FLAGS
--query=QUERY
Use Google Standard SQL query for Cloud Spanner and MySQL query syntax for CloudSQL. Cloud Spanner SQL is described athttps://cloud.google.com/spanner/docs/query-syntax)"
COMMONLY USED FLAGS
--format=FORMAT
Sets the format for printing command output resources. The default is acommand-specific human-friendly output format. If bothcore/formatand--format are specified,--format takes precedence.--format andcore/format both take precedence overcore/default_format. The supported formats are limited to:config,csv,default,diff,disable,flattened,get,json,list,multi,none,object,table,text,value,yaml. For more details run $gcloud topic formats. Run$gcloud config set --help tosee more information aboutcore/format
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.

NOTES
These variants are also available:
gcloudalphametastoreservicesquery-metadata
gcloudbetametastoreservicesquery-metadata

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-05-07 UTC.