gcloud metastore services query-metadata Stay organized with collections Save and categorize content based on your preferences.
- 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 name
my-metastore-servicein 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 the
projectattribute:- provide the argument
serviceon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
SERVICE- ID of the service or fully qualified identifier for the service.
To set the
serviceattribute:- provide the argument
serviceon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- Location to which the service belongs.
To set the
locationattribute:- provide the argument
serviceon 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
- 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.
- 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 both
core/formatand--formatare specified,--formattakes precedence.--formatandcore/formatboth 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 --helptosee 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 helpfor details. - NOTES
- These variants are also available:
gcloudalphametastoreservicesquery-metadatagcloudbetametastoreservicesquery-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.