- NAME
-
- gcloud alpha bq translation translate-metadata - translates metadata from zip files into DDL statements and table mappings
- SYNOPSIS
-
-
gcloud alpha bq translation translate-metadata--location=LOCATION--source-dialect=SOURCE_DIALECT--target-dialect=TARGET_DIALECT--target-gcs-path=TARGET_GCS_PATH[--async] [--endpoint-mode=ENDPOINT_MODE] [--source-gcs-files=[FILE_URI,…]] [--source-gcs-uris=[URI,…]] [--source-local-dirs=[LOCAL_DIR=CLOUD_STORAGE_URI,…]] [--source-local-files=[LOCAL_FILE=CLOUD_STORAGE_FILE_URI,…]] [GCLOUD_WIDE_FLAG …]
-
- EXAMPLES
-
To translate Teradata metadata in Cloud Storage in location
us-central1, run:gcloud alpha bq translation translate-metadata --source-dialect=teradata --target-dialect=bigquery --location=us-central1 --source-gcs-uris=gs://my-bucket/metadata/ --target-gcs-path=gs://my-bucket/ddl_output/To upload metadata from a local directory and translate it, run:
gcloud alpha bq translation translate-metadata --source-dialect=teradata --target-dialect=bigquery --location=us-central1 --source-local-dirs=./metadata=gs://my-bucket/metadata/ --target-gcs-path=gs://my-bucket/ddl_output/ - REQUIRED FLAGS
-
--location=LOCATION- The location to execute the translation.
--source-dialect=SOURCE_DIALECT- The dialect of the source metadata.
--target-dialect=TARGET_DIALECT- The dialect of the target tables.
--target-gcs-path=TARGET_GCS_PATH- The Cloud Storage base URI where translated DDL outputs will be written.
- OPTIONAL FLAGS
-
--async- Return immediately, without waiting for the operation in progress to complete.
--endpoint-mode=ENDPOINT_MODE-
Specifies endpoint mode for a given command. Regional endpoints provide enhanced
data residency and reliability by ensuring your request is handled entirely
within the specified Google Cloud region. This differs from global endpoints,
which may process parts of the request outside the target region. Overrides the
default
regional/endpoint_modeproperty value for this command invocation.ENDPOINT_MODEmust be one of:global- (Default) Use global rather than regional endpoints.
regional- Only use regional endpoints. An error will be raised if a regional endpoint is not available for a given command.
regional-preferred- Use regional endpoints when available, otherwise use global endpoints. Recommended for most users.
--source-gcs-files=[FILE_URI,…]- List of Cloud Storage URIs pointing to individual metadata zip files.
--source-gcs-uris=[URI,…]- List of Cloud Storage URI prefixes containing metadata zip files.
--source-local-dirs=[LOCAL_DIR=CLOUD_STORAGE_URI,…]- Map of local directories to their corresponding Cloud Storage URIs (e.g., local_dir=gs://bucket/path). The local directories will be uploaded to the specified Cloud Storage URIs before metadata translation, and those Cloud Storage URIs will be automatically included in the translation job.
--source-local-files=[LOCAL_FILE=CLOUD_STORAGE_FILE_URI,…]- Map of local files to their corresponding Cloud Storage URIs (e.g., local_file=gs://bucket/path/file.zip). The local files will be uploaded to the specified Cloud Storage URIs before metadata translation, and those Cloud Storage URIs will be automatically included in the translation job.
- 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. - REGIONAL ENDPOINTS
-
This command supports regional endpoints. To use regional endpoints for this
command, use the
--endpoint-mode=regional-preferredflag. To use regional endpoints by default, run$ gcloud config set regional/endpoint_mode regional-preferred. - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha bq translation translate-metadata
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-09-29 UTC.