简体   繁体   中英

Temporal Data Management in Google Cloud Datastore

Is there an api (like hibernate, etc) to manage temporal data in Google Cloud Datastore? Basically i need to maintain bi-temporal data in my datastore. Is there an api that i can use to easily manage this?

I'm not 100% sure what you mean by "bi-temporal data".

If you mean different data classes that are have different pricing and access times, there are different storage classes (standard and nearline). https://cloud.google.com/storage/docs/storage-classes . These are set at the bucket level at creation time. For example: gsutil mb -c nearline -l region bucket-url .

You can also set a time-to-live at the bucket level. https://cloud.google.com/storage/docs/lifecycle

Using gsutil you can set this policy by uploading a JSON file like this example from the docs:

{
  "lifecycle": {
    "rule":
    [
      {
        "action": {"type": "Delete"},
        "condition": {"age": 365}
      }
    ]
  } 
}

Save to a file and then gsutil set json-file-name bucket-url .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM