We are using google cloud datastore
to store data and unfortunately initially haven't followed name convention for naming kinds
and now we want to change names of already existing kinds in datastore.
We have already accumulated a lot of data and a lot of computation was involved generating that data so populating that complete data again just to rename a kind isn't an option for us.
Have tried finding it out but with no luck. So is there something which I have missed and can be helpful in achieving it ?
An Entity is an individual record that gets stored and retrieved from the datastore. The Kind is the unique string identifier of the type of entity. For example, "Joe" is an Entity with age=42, dob=10-12-2000, and Kind "Person".
To update an existing entity, modify the attributes of the Entity object, then pass it to the DatastoreService. put() method. The object data overwrites the existing entity. The entire object is sent to Datastore with every call to put() .
You cannot rename a
kind
in datastore, Because the kind name is embedded with the key of each element in the datastore. You will have to write a script to migrate all the data to the newkind
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With