gcloud datastore import Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud datastore import - import Cloud Datastore entities from Google Cloud Storage
- SYNOPSIS
gcloud datastore importINPUT_URL[--async][--kinds=[KIND,…]][--namespaces=[NAMESPACE,…]][--operation-labels=[OPERATION_LABEL,…]][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
- Imports entities into Google Cloud Datastore. Existing entities with the samekey are overwritten. The import occurs in the background and its progress can bemonitored and managed via the Operation resource that is created. If an Importoperation is cancelled, it is possible that a subset of the data has alreadybeen imported to Cloud Datastore. This data will not be removed.
- EXAMPLES
- To import all data exported to the output URL
gs://exampleBucket/exampleExport/exampleExport.overall_export_metadata,run:gclouddatastoreimportgs://exampleBucket/exampleExport/exampleExport.overall_export_metadataTo import all data exported to the output URL
gs://exampleBucket/exampleExport/exampleExport.overall_export_metadatawithout waiting for the operation to complete, run:gclouddatastoreimportgs://exampleBucket/exampleExport/exampleExport.overall_export_metadata--asyncTo import only the
exampleKindfrom the data exported to the outputURLgs://exampleBucket/exampleExport/exampleExport.overall_export_metadata,run:gclouddatastoreimportgs://exampleBucket/exampleExport/exampleExport.overall_export_metadata--kinds='exampleKind' - POSITIONAL ARGUMENTS
INPUT_URL- Location of the import metadata. Must be a valid Google Cloud Storage object.The file extension is 'overall_export_metadata'.
This location is the 'output_url' field of a previous export, and can be foundvia the 'operations describe' command.
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--kinds=[KIND,…]- A list specifying what kinds will be included in the operation. When omitted,all Kinds are included. For example, to operate on only the 'Customer' and'Order' Kinds:
gclouddatastoreimport--kinds='Customer','Order' --namespaces=[NAMESPACE,…]- A list specifying what namespaces will be included in the operation. Whenomitted, all namespaces are included in the operation, including the defaultnamespace. To specify that
onlythe default namespace should beoperated on, use the special symbol '(default)'. For example, to operate onentities from both the 'customers' and default namespaces:gclouddatastoreimport--namespaces='(default)','customers' --operation-labels=[OPERATION_LABEL,…]- A string:string map of custom labels to associate with this operation. Forexample:
gclouddatastoreimport--operation-labels=comment='customer orders','sales rep'=pending
- 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:
gcloudalphadatastoreimportgcloudbetadatastoreimport
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.